drm/amdgpu: the warning dereferencing obj for nbio_v7_4
authorjsg <jsg@openbsd.org>
Mon, 9 Sep 2024 09:37:34 +0000 (09:37 +0000)
committerjsg <jsg@openbsd.org>
Mon, 9 Sep 2024 09:37:34 +0000 (09:37 +0000)
From Jesse Zhang
7d265772e44d403071a2b573eac0db60250b1c21 in linux-6.6.y/6.6.50
d190b459b2a4304307c3468ed97477b808381011 in mainline linux

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

index 685abf5..977b956 100644 (file)
@@ -384,7 +384,7 @@ static void nbio_v7_4_handle_ras_controller_intr_no_bifring(struct amdgpu_device
                else
                        WREG32_SOC15(NBIO, 0, mmBIF_DOORBELL_INT_CNTL, bif_doorbell_intr_cntl);
 
-               if (!ras->disable_ras_err_cnt_harvest) {
+               if (ras && !ras->disable_ras_err_cnt_harvest && obj) {
                        /*
                         * clear error status after ras_controller_intr
                         * according to hw team and count ue number