Commit 4bd56ca8 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

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: 5fe909ca ("drm/panthor: Add the device logical block")
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Reviewed-by: default avatarAdrian Larumbe <adrian.larumbe@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-2-boris.brezillon@collabora.com
parent 6b4dfdcd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);