diff options
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0803-drm-panel-ilitek-ili9881c-Clean-up-on-mipi_dsi_attac.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0803-drm-panel-ilitek-ili9881c-Clean-up-on-mipi_dsi_attac.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0803-drm-panel-ilitek-ili9881c-Clean-up-on-mipi_dsi_attac.patch b/target/linux/bcm27xx/patches-5.15/950-0803-drm-panel-ilitek-ili9881c-Clean-up-on-mipi_dsi_attac.patch new file mode 100644 index 0000000000..c5d1ade992 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0803-drm-panel-ilitek-ili9881c-Clean-up-on-mipi_dsi_attac.patch @@ -0,0 +1,31 @@ +From 6339483e274de22714984c3b017de13c3f991e98 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <dave.stevenson@raspberrypi.com> +Date: Thu, 31 Mar 2022 12:03:36 +0100 +Subject: [PATCH] drm/panel: ilitek-ili9881c: Clean up on + mipi_dsi_attach failure + +mipi_dsi_attach is allowed to fail, and currently the probe +code doesn't clean up (mainly drm_panel_remove) if this happens. + +Add cleanup code on failure. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> +--- + drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c ++++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +@@ -913,7 +913,11 @@ static int ili9881c_dsi_probe(struct mip + dsi->format = MIPI_DSI_FMT_RGB888; + dsi->lanes = 4; + +- return mipi_dsi_attach(dsi); ++ ret = mipi_dsi_attach(dsi); ++ if (ret) ++ drm_panel_remove(&ctx->panel); ++ ++ return ret; + } + + static int ili9881c_dsi_remove(struct mipi_dsi_device *dsi) |