drm/panel: simplify the return expression of rb070d30_panel_enable()
authorLiu Shixin <liushixin2@huawei.com>
Tue, 15 Sep 2020 03:26:23 +0000 (11:26 +0800)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 17 Oct 2020 06:10:42 +0000 (08:10 +0200)
Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200915032623.1772361-1-liushixin2@huawei.com
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c

index 535c8d1..a378283 100644 (file)
@@ -75,13 +75,8 @@ static int rb070d30_panel_unprepare(struct drm_panel *panel)
 static int rb070d30_panel_enable(struct drm_panel *panel)
 {
        struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
-       int ret;
 
-       ret = mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
-       if (ret)
-               return ret;
-
-       return 0;
+       return mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
 }
 
 static int rb070d30_panel_disable(struct drm_panel *panel)