Skip to content

Commit 4ac5111

Browse files
committed
drm/panel: panasonic-vvx10f034n00: More return value fixes
A couple more return value fixes which Philippe brought up during our previous review. Suggested-by: Philippe CORNU <[email protected]> Reviewed-by: Philippe Cornu <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent dd63250 commit 4ac5111

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,35 +59,28 @@ static inline struct wuxga_nt_panel *to_wuxga_nt_panel(struct drm_panel *panel)
5959

6060
static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
6161
{
62-
struct mipi_dsi_device *dsi = wuxga_nt->dsi;
63-
int ret;
64-
65-
ret = mipi_dsi_turn_on_peripheral(dsi);
66-
if (ret < 0)
67-
return ret;
68-
69-
return 0;
62+
return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
7063
}
7164

7265
static int wuxga_nt_panel_disable(struct drm_panel *panel)
7366
{
7467
struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
75-
int ret;
68+
int mipi_ret, bl_ret = 0;
7669

7770
if (!wuxga_nt->enabled)
7871
return 0;
7972

80-
ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
73+
mipi_ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
8174

8275
if (wuxga_nt->backlight) {
8376
wuxga_nt->backlight->props.power = FB_BLANK_POWERDOWN;
8477
wuxga_nt->backlight->props.state |= BL_CORE_FBBLANK;
85-
backlight_update_status(wuxga_nt->backlight);
78+
bl_ret = backlight_update_status(wuxga_nt->backlight);
8679
}
8780

8881
wuxga_nt->enabled = false;
8982

90-
return ret;
83+
return mipi_ret ? mipi_ret : bl_ret;
9184
}
9285

9386
static int wuxga_nt_panel_unprepare(struct drm_panel *panel)

0 commit comments

Comments
 (0)