* [PATCH] drm/panel: simple: Clean up resources on DSI attach failure
@ 2026-09-10 22:38 Myeonghun Pak
0 siblings, 0 replies; only message in thread
From: Myeonghun Pak @ 2026-09-10 22:38 UTC (permalink / raw)
To: Neil Armstrong, dri-devel
Cc: Jessica Zhang, Thierry Reding, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, linux-kernel,
stable, Ijae Kim
If mipi_dsi_attach() fails after panel_simple_probe() succeeds, only the
panel registration is undone, leaving runtime PM enabled and an optional
DDC adapter reference unreleased.
Call panel_simple_remove() to unwind the common probe resources as well.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 210fcd9d9cf1 ("drm/panel: Add support for Panasonic VVX10F004B0")
Cc: stable@vger.kernel.org
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/gpu/drm/panel/panel-simple.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index c95964ba25a9..767068de6816 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -6552,11 +6552,8 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
dsi->lanes = desc->lanes;
err = mipi_dsi_attach(dsi);
- if (err) {
- struct panel_simple *panel = mipi_dsi_get_drvdata(dsi);
-
- drm_panel_remove(&panel->base);
- }
+ if (err)
+ panel_simple_remove(&dsi->dev);
return err;
}
--
2.50.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-10 22:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 22:38 [PATCH] drm/panel: simple: Clean up resources on DSI attach failure Myeonghun Pak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®