diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-11-15 01:22:45 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-11-15 01:22:45 +0000 |
commit | cb24d197145e548e6738c2ce0ab3b78ef75ca635 (patch) | |
tree | 32b4a370bfba101a1af68cd7c60a178cabcaa2d0 /sys | |
parent | 1d9d3568a65bc8ae17430b82beafbefafcbfd2ca (diff) |
drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
From Antonio Quartulli
a613a392417532ca5aaf3deac6e3277aa7aaef2b in linux-6.6.y/6.6.61
a6dd15981c03f2cdc9a351a278f09b5479d53d2e in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c index b8a44fb38ed..9e0813260e2 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c @@ -174,8 +174,8 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif *atif, &buffer); obj = (union acpi_object *)buffer.pointer; - /* Fail if calling the method fails and ATIF is supported */ - if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { + /* Fail if calling the method fails */ + if (ACPI_FAILURE(status)) { DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n", acpi_format_exception(status)); kfree(obj); |