summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorManinder Singh <maninder1.s@samsung.com>2015-06-26 09:56:57 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-06-29 17:21:51 +0200
commita08c1d516fb3eb302ff14a10eedda844e75c625f (patch)
treef2fef0bf2885015b636d0ff20d8898651d013ecb /drivers/gpu
parentdrm/amdgpu: use kzalloc for allocating one thing (diff)
downloadlinux-a08c1d516fb3eb302ff14a10eedda844e75c625f.tar.xz
linux-a08c1d516fb3eb302ff14a10eedda844e75c625f.zip
drm/amdgpu: remove unnecessary check before kfree
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index fec487d1c870..a85cd08901a7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1575,8 +1575,7 @@ void amdgpu_device_fini(struct amdgpu_device *adev)
amdgpu_fence_driver_fini(adev);
amdgpu_fbdev_fini(adev);
r = amdgpu_fini(adev);
- if (adev->ip_block_enabled)
- kfree(adev->ip_block_enabled);
+ kfree(adev->ip_block_enabled);
adev->ip_block_enabled = NULL;
adev->accel_working = false;
/* free i2c buses */