From 61ce50fd8196c8782b9620bb60d33649ec429f64 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 21 Aug 2025 15:30:54 +0300 Subject: [PATCH] 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 Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/aKcRfq8xBrFmhqmO@stanley.mountain --- drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c index 83656bb4b0b21..23462065d726b 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c +++ b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c @@ -233,8 +233,10 @@ static int jdi_panel_prepare(struct drm_panel *panel) mipi_dsi_dual(mipi_dsi_dcs_set_display_on_multi, &dsi_ctx, jdi->link1, jdi->link2); - if (dsi_ctx.accum_err < 0) + if (dsi_ctx.accum_err < 0) { + err = dsi_ctx.accum_err; goto poweroff; + } jdi->link1->mode_flags &= ~MIPI_DSI_MODE_LPM; jdi->link2->mode_flags &= ~MIPI_DSI_MODE_LPM; -- 2.47.3