drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
authorjsg <jsg@openbsd.org>
Mon, 5 Aug 2024 02:33:42 +0000 (02:33 +0000)
committerjsg <jsg@openbsd.org>
Mon, 5 Aug 2024 02:33:42 +0000 (02:33 +0000)
From Friedrich Vock
67b4592a7d74e57a5a0929eaf3ae30414ebd39ae in linux-6.6.y/6.6.44
0cdb3f9740844b9d95ca413e3fcff11f81223ecf in mainline linux

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

index 7e894d9..81464ea 100644 (file)
@@ -5775,7 +5775,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
            adev->nbio.funcs->enable_doorbell_interrupt)
                adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
 
-       if (amdgpu_passthrough(adev) &&
+       if (amdgpu_passthrough(adev) && adev->nbio.funcs &&
            adev->nbio.funcs->clear_doorbell_interrupt)
                adev->nbio.funcs->clear_doorbell_interrupt(adev);