drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'
authorjsg <jsg@openbsd.org>
Tue, 6 Feb 2024 03:59:48 +0000 (03:59 +0000)
committerjsg <jsg@openbsd.org>
Tue, 6 Feb 2024 03:59:48 +0000 (03:59 +0000)
From Srinivasan Shanmugam
25c2de1fbd8ee13008791a3c131f5fed02b3ccec in linux-6.6.y/6.6.16
8a44fdd3cf91debbd09b43bd2519ad2b2486ccf4 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c

index ad0e8f4..61a6748 100644 (file)
@@ -1224,6 +1224,7 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
                                return true;
 
                        fw_ver = *((uint32_t *)adev->pm.fw->data + 69);
+                       release_firmware(adev->pm.fw);
                        if (fw_ver < 0x00160e00)
                                return true;
                }