drm/amdgpu: remove unnecessary check before kfree
authorManinder Singh <maninder1.s@samsung.com>
Fri, 26 Jun 2015 07:56:57 +0000 (13:26 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jun 2015 15:21:51 +0000 (11:21 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index fec487d1c870ae27ea586ddda2def8b6c45272e4..a85cd08901a71404166daf1842c38b180811630c 100644 (file)
@@ -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 */