diff options
author | Jesse Zhang <jesse.zhang@amd.com> | 2024-05-13 10:22:42 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-05-13 23:12:02 +0300 |
commit | d190b459b2a4304307c3468ed97477b808381011 (patch) | |
tree | 55e4793175a95185718d25ef3f92a328e4857c51 /drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | |
parent | 3b7d552ea1a03ae007783ef934cfa32a45c28258 (diff) | |
download | linux-d190b459b2a4304307c3468ed97477b808381011.tar.xz |
drm/amdgpu: the warning dereferencing obj for nbio_v7_4
if ras_manager obj null, don't print NBIO err data
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c index fe18df10daaa..32cc60ce5521 100644 --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c @@ -383,7 +383,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 |