If a userq failed to suspend the rest of the suspend sequence may
have problems.  Pass the error code up to the caller for a decision
on what to do.

Signed-off-by: Mario Limonciello <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e16cf64dddba..4ae12ebc0d7b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5222,7 +5222,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool 
notify_clients)
                return r;
 
        amdgpu_amdkfd_suspend(adev, !amdgpu_sriov_vf(adev) && !adev->in_runpm);
-       amdgpu_userq_suspend(adev);
+       r = amdgpu_userq_suspend(adev);
+       if (r)
+               return r;
 
        r = amdgpu_device_evict_resources(adev);
        if (r)
-- 
2.51.0

Reply via email to