drm/meson: pm resume add return errno branch
authorBernard Zhao <bernard@vivo.com>
Tue, 28 Apr 2020 13:17:47 +0000 (06:17 -0700)
committerNeil Armstrong <narmstrong@baylibre.com>
Wed, 13 May 2020 10:00:37 +0000 (12:00 +0200)
pm_resump api did not handle drm_mode_config_helper_resume error.
This change add handle to return drm_mode_config_helper_resume`s
error number. This code logic is aligned with api pm_suspend.
After this change, the code maybe a bit readable.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200428131747.2099-1-bernard@vivo.com
drivers/gpu/drm/meson/meson_drv.c

index b5f5eb7b4bb904b311f5994750e5830026a8ae1b..8c2e1b47e81a59c582b4556ed7cde3f7c4df2452 100644 (file)
@@ -412,9 +412,7 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev)
        if (priv->afbcd.ops)
                priv->afbcd.ops->init(priv);
 
-       drm_mode_config_helper_resume(priv->drm);
-
-       return 0;
+       return drm_mode_config_helper_resume(priv->drm);
 }
 
 static int compare_of(struct device *dev, void *data)