All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/amdgpu: remove unnecessary check before kfree
@ 2015-06-26  7:56 ` Maninder Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Maninder Singh @ 2015-06-26  7:56 UTC (permalink / raw)
  To: airlied, alexander.deucher, christian.koenig, Jammy.Zhou,
	young.yang, samuel.li, marek.olsak, dri-devel, linux-kernel
  Cc: pankaj.m, Maninder Singh

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>
---
v2: Chnged shortlog prefix - gpu/amdgpu

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index fec487d..a85cd08 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 */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-26 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26  7:56 [PATCH v2] drm/amdgpu: remove unnecessary check before kfree Maninder Singh
2015-06-26  7:56 ` Maninder Singh
2015-06-26 17:01 ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.