Skip to content

Commit 7acc79e

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/amdgpu: fix null pointer in runtime pm
fix the null pointer issue when runtime pm is triggered. Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 6600f9d commit 7acc79e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4852,7 +4852,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
48524852
if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
48534853
return -ENOTSUPP;
48544854

4855-
if (ras && ras->supported)
4855+
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
48564856
adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
48574857

48584858
return amdgpu_dpm_baco_enter(adev);
@@ -4871,7 +4871,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
48714871
if (ret)
48724872
return ret;
48734873

4874-
if (ras && ras->supported)
4874+
if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
48754875
adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
48764876

48774877
return 0;

0 commit comments

Comments
 (0)