aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
diff options
context:
space:
mode:
authorRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>2020-01-27 13:47:41 -0500
committerAlex Deucher <alexander.deucher@amd.com>2020-02-12 16:00:25 -0500
commit70bedd68e7b3a7f1d7f3198bb698fc23bc5aaa68 (patch)
tree72171ccd808a887cb9782e4fee492d9558dbfbc6 /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
parentdb70e2c13983926d8d657db3e740264b75ad20a4 (diff)
downloadkernel_replicant_linux-70bedd68e7b3a7f1d7f3198bb698fc23bc5aaa68.tar.gz
kernel_replicant_linux-70bedd68e7b3a7f1d7f3198bb698fc23bc5aaa68.tar.bz2
kernel_replicant_linux-70bedd68e7b3a7f1d7f3198bb698fc23bc5aaa68.zip
drm/amdgpu: Fix missing error check in suspend
amdgpu_device_suspend might return an error code since it can be called from both runtime and system suspend flows. Add the missing return code in case of a failure. Reviewed-by: Oak Zeng <oak.zeng@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 9043fb7578e6..d0b2127e1561 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1226,6 +1226,9 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
drm_kms_helper_poll_disable(drm_dev);
ret = amdgpu_device_suspend(drm_dev, false);
+ if (ret)
+ return ret;
+
if (amdgpu_device_supports_boco(drm_dev)) {
/* Only need to handle PCI state in the driver for ATPX
* PCI core handles it for _PR3.