diff options
| author | Wen Yang <[email protected]> | 2018-12-05 07:43:19 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2018-12-05 22:50:26 +0000 |
| commit | 8288b2e5ae01cabd078836618fd651574343cbfc (patch) | |
| tree | 9143975520c7dca8d3ebd57c9b299b0786b1c097 /drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | |
| parent | drm/amd/include: Add mmhub 9.4 reg offsets and shift-mask (diff) | |
| download | kernel-8288b2e5ae01cabd078836618fd651574343cbfc.tar.gz kernel-8288b2e5ae01cabd078836618fd651574343cbfc.zip | |
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.
Reviewed-by: Lyude Paul <[email protected]>
Signed-off-by: Wen Yang <[email protected]>
CC: Alex Deucher <[email protected]>
CC: [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]>
CC: [email protected]
CC: [email protected]
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index 47db65926d71..4376b17ca594 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -886,6 +886,5 @@ void amdgpu_acpi_get_backlight_caps(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); } |
