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>
This commit is contained in:
committed by
Alex Deucher
parent
db70e2c139
commit
70bedd68e7
@@ -1226,6 +1226,9 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
|
|||||||
drm_kms_helper_poll_disable(drm_dev);
|
drm_kms_helper_poll_disable(drm_dev);
|
||||||
|
|
||||||
ret = amdgpu_device_suspend(drm_dev, false);
|
ret = amdgpu_device_suspend(drm_dev, false);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (amdgpu_device_supports_boco(drm_dev)) {
|
if (amdgpu_device_supports_boco(drm_dev)) {
|
||||||
/* Only need to handle PCI state in the driver for ATPX
|
/* Only need to handle PCI state in the driver for ATPX
|
||||||
* PCI core handles it for _PR3.
|
* PCI core handles it for _PR3.
|
||||||
|
|||||||
Reference in New Issue
Block a user