[PATCH 5/5] drivers/amdgpu: Remove redundant NULL check before kfree()
Edward O'Callaghan
funfunctor at folklore1984.net
Sun Jul 10 09:03:13 UTC 2016
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index cf6f49f..6f11bc1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -1053,8 +1053,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
}
error:
- if (obj != NULL)
- kfree(obj);
+ kfree(obj);
kfree((void *)input.pointer);
return result;
}
--
2.7.4
More information about the amd-gfx
mailing list