struct ltdc_device *ldev = ddev->dev_private;
struct drm_atomic_state *state;
- if (WARN_ON(!ldev->suspend_state))
- return -ENOENT;
+ WARN_ON(ldev->suspend_state);
state = drm_atomic_helper_suspend(ddev);
if (IS_ERR(state))
struct ltdc_device *ldev = ddev->dev_private;
int ret;
+ if (WARN_ON(!ldev->suspend_state))
+ return -ENOENT;
+
pm_runtime_force_resume(dev);
ret = drm_atomic_helper_resume(ddev, ldev->suspend_state);
- if (ret) {
+ if (ret)
pm_runtime_force_suspend(dev);
- ldev->suspend_state = NULL;
- return ret;
- }
- return 0;
+ ldev->suspend_state = NULL;
+
+ return ret;
}
static __maybe_unused int drv_runtime_suspend(struct device *dev)