drm/amdgpu/acpi: NULL check before some freeing functions is not needed
Subsystems (2)
PATCH 1/1 drm/amdgpu/acpi: NULL check before some freeing functions is not needed
kfree(NULL) is safe, so removes NULL check before freeing the mem. This patch also fix the ifnullfree.cocci warnings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 -2
@@ -816,6 +816,5 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)void amdgpu_acpi_fini (struct amdgpu_device *adev) {unregister_acpi_notifier (&adev->acpi_nb); -if (adev->atif) -kfree (adev->atif); +kfree (adev->atif); }
Signature · 6 lines
2.19.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20181205074319.25030-1-wen.yang99-Th6q7B73Y6EnDS1+zs4M5A@public.gmane.org
Lyude Paul
Reviewed-byThanks!
Quoted 30 lines · Wen Yang
kfree(NULL) is safe, so removes NULL check before freeing the mem. This patch also fix the
ifnullfree.cocciwarnings.Signed-off-by Wen Yang <[email protected]>CC Alex Deucher <[email protected]>CC "David (ChunMing) Zhou" <[email protected]>CC David Airlie <[email protected]> (maintainer:DRM DRIVERS)CC Lyude Paul <[email protected]>CC Rex Zhu <[email protected]>CC Jim Qu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1
-2@@ -816,6 +816,5 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)void amdgpu_acpi_fini (struct amdgpu_device *adev) {unregister_acpi_notifier (&adev->acpi_nb); -if (adev->atif) -kfree (adev->atif); +kfree (adev->atif); }
Signature · 7 lines
Cheers, Lyude Paul _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): a19680277a06b409d311b476b6fd552194ebe6ab.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Alex Deucher
AppliedApplied. thanks!
Alex
Quoted 40 lines · Lyude Paul
Reviewed-by Lyude Paul <[email protected]>Thanks!
Quoted 23 lines · Wen Yang
kfree(NULL) is safe, so removes NULL check before freeing the mem. This patch also fix the
ifnullfree.cocciwarnings.Signed-off-by Wen Yang <[email protected]>CC Alex Deucher <[email protected]>CC "David (ChunMing) Zhou" <[email protected]>CC David Airlie <[email protected]> (maintainer:DRM DRIVERS)CC Lyude Paul <[email protected]>CC Rex Zhu <[email protected]>CC Jim Qu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c int amdgpu_acpi_init(struct amdgpu_device *adev) · line 820
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1
-2@@ -816,6 +816,5 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)void amdgpu_acpi_fini (struct amdgpu_device *adev) {unregister_acpi_notifier (&adev->acpi_nb); -if (adev->atif) -kfree (adev->atif); +kfree (adev->atif); }--
Cheers,
Lyude Paul
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx