[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200411230347.22371-65-sashal@kernel.org>
Date: Sat, 11 Apr 2020 19:02:22 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>,
Oak Zeng <oak.zeng@....com>,
Felix Kuehling <felix.kuehling@....com>,
Alex Deucher <alexander.deucher@....com>,
Sasha Levin <sashal@...nel.org>, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org
Subject: [PATCH AUTOSEL 5.6 065/149] drm/amdgpu: Fix missing error check in suspend
From: Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>
[ Upstream commit 70bedd68e7b3a7f1d7f3198bb698fc23bc5aaa68 ]
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@....com>
Reviewed-by: Felix Kuehling <felix.kuehling@....com>
Reviewed-by: Alex Deucher <alexander.deucher@....com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@....com>
Signed-off-by: Alex Deucher <alexander.deucher@....com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 42f4febe24c6d..921e2944255b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1225,6 +1225,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.
--
2.20.1
Powered by blists - more mailing lists