diff options
author | Antonio Quartulli <antonio@mandelbit.com> | 2024-10-31 16:28:48 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-11-04 12:05:16 -0500 |
commit | 91c9e221fe2553edf2db71627d8453f083de87a1 (patch) | |
tree | 93508120eea4785da470248d86c263b90c2335a0 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 69516fbdba6c809c70a2c8c633c3a34361e9d3f0 (diff) | |
download | linux-91c9e221fe2553edf2db71627d8453f083de87a1.tar.gz linux-91c9e221fe2553edf2db71627d8453f083de87a1.tar.bz2 linux-91c9e221fe2553edf2db71627d8453f083de87a1.zip |
drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
acpi_evaluate_object() may return AE_NOT_FOUND (failure), which
would result in dereferencing buffer.pointer (obj) while being NULL.
Although this case may be unrealistic for the current code, it is
still better to protect against possible bugs.
Bail out also when status is AE_NOT_FOUND.
This fixes 1 FORWARD_NULL issue reported by Coverity
Report: CID 1600951: Null pointer dereferences (FORWARD_NULL)
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Fixes: c9b7c809b89f ("drm/amd: Guard against bad data for ATIF ACPI method")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241031152848.4716-1-antonio@mandelbit.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions