[PATCH] drm/amdgpu: NULL check before some freeing functions is not needed.

Thomas Meyer thomas at m3y3r.de
Sun Dec 2 20:52:11 UTC 2018


NULL check before some freeing functions is not needed.

Signed-off-by: Thomas Meyer <thomas at m3y3r.de>
---

diff -u -p a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -816,6 +816,5 @@ out:
 void amdgpu_acpi_fini(struct amdgpu_device *adev)
 {
 	unregister_acpi_notifier(&adev->acpi_nb);
-	if (adev->atif)
-		kfree(adev->atif);
+	kfree(adev->atif);
 }


More information about the amd-gfx mailing list