summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@collabora.com>2024-12-11 08:54:15 +0100
committerBoris Brezillon <boris.brezillon@collabora.com>2024-12-11 10:03:50 +0100
commit4bd56ca8226dda6115bca385b166ef87e867d807 (patch)
tree65e408dfe59b6e6ed15dc28b1ebe1098291bbf64
parent6b4dfdcde3573a12b72d2869dabd4ca37ad7e9c7 (diff)
downloadlinux-4bd56ca8226dda6115bca385b166ef87e867d807.tar.gz
linux-4bd56ca8226dda6115bca385b166ef87e867d807.zip
drm/panthor: Preserve the result returned by panthor_fw_resume()
WARN() will return true if the condition is true, false otherwise. If we store the return of drm_WARN_ON() in ret, we lose the actual error code. v3: - Add R-b v2: - Add R-b Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-2-boris.brezillon@collabora.com
-rw-r--r--drivers/gpu/drm/panthor/panthor_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index 00f7b8ce935a..b3c117d55c2a 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -465,8 +465,8 @@ int panthor_device_resume(struct device *dev)
drm_dev_enter(&ptdev->base, &cookie)) {
panthor_gpu_resume(ptdev);
panthor_mmu_resume(ptdev);
- ret = drm_WARN_ON(&ptdev->base, panthor_fw_resume(ptdev));
- if (!ret) {
+ ret = panthor_fw_resume(ptdev);
+ if (!drm_WARN_ON(&ptdev->base, ret)) {
panthor_sched_resume(ptdev);
} else {
panthor_mmu_suspend(ptdev);