When amdgpu_device_health_check fails, amdgpu_ras_pre_reset
will not be called and therefore amdgpu_ras_post_reset
cannot be called either.

Signed-off-by: YiPeng Chai <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7ee3dabc0cf5..eca11fbc637a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -6751,8 +6751,8 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
        amdgpu_device_gpu_resume(adev, &device_list, need_emergency_restart);
 reset_unlock:
        amdgpu_device_recovery_put_reset_lock(adev, &device_list);
-end_reset:
        amdgpu_ras_post_reset(adev, &device_list);
+end_reset:
        if (hive) {
                mutex_unlock(&hive->hive_lock);
                amdgpu_put_xgmi_hive(hive);
-- 
2.34.1

Reply via email to