Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: jdi-lpm102a188a: Fix error code in jdi_panel_prepare()

If the mipi_dsi_dual() macro fails, the error code is stored in
dsi_ctx.accum_err. Propagate that error back to the caller instead
of returning success as the current code does.

Fixes: a6adf47d30cc ("drm/panel: jdi-lpm102a188a: Fix bug and clean up driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/aKcRfq8xBrFmhqmO@stanley.mountain

authored by

Dan Carpenter and committed by
Douglas Anderson
61ce50fd 96481012

+3 -1
+3 -1
drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c
··· 233 233 mipi_dsi_dual(mipi_dsi_dcs_set_display_on_multi, 234 234 &dsi_ctx, jdi->link1, jdi->link2); 235 235 236 - if (dsi_ctx.accum_err < 0) 236 + if (dsi_ctx.accum_err < 0) { 237 + err = dsi_ctx.accum_err; 237 238 goto poweroff; 239 + } 238 240 239 241 jdi->link1->mode_flags &= ~MIPI_DSI_MODE_LPM; 240 242 jdi->link2->mode_flags &= ~MIPI_DSI_MODE_LPM;