From 5c39f71215ccf952d636c70edf8a26843f0b0cde Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 09:37:34 +0000 Subject: [PATCH] drm/amdgpu: the warning dereferencing obj for nbio_v7_4 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/nbio_v7_4.c b/sys/dev/pci/drm/amd/amdgpu/nbio_v7_4.c index 685abf57ffd..977b956bf93 100644 --- a/sys/dev/pci/drm/amd/amdgpu/nbio_v7_4.c +++ b/sys/dev/pci/drm/amd/amdgpu/nbio_v7_4.c @@ -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 -- 2.20.1