diff options
author | Dave Airlie <airlied@redhat.com> | 2017-10-03 07:27:14 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-06 20:05:03 +0300 |
commit | d029810caafa4e6b146274560154e3f0f0381fb5 (patch) | |
tree | df4f51e4d06cc4faa3a5dbf9db44de4e03e85a63 /drivers/gpu/drm/amd/display/dc/basics | |
parent | 5667ff5c117f2d8735f27a267bc68a0811c55075 (diff) | |
download | linux-d029810caafa4e6b146274560154e3f0f0381fb5.tar.xz |
amdgpu/dc: kfree already checks for NULL.
Don't bother checking for it.
Found with the cocci ifnullfree.cocci script.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/basics/vector.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/vector.c b/drivers/gpu/drm/amd/display/dc/basics/vector.c index e00fc4db3ac4..217b8f1f7bf6 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/vector.c +++ b/drivers/gpu/drm/amd/display/dc/basics/vector.c @@ -130,8 +130,7 @@ struct vector *dal_vector_create( void dal_vector_destruct( struct vector *vector) { - if (vector->container != NULL) - kfree(vector->container); + kfree(vector->container); vector->count = 0; vector->capacity = 0; } |