* [PATCH] drm/panel: panel-dsi-cm: Fix double put of external backlight
@ 2026-12-02 19:15 Yige Jiang
0 siblings, 0 replies; only message in thread
From: Yige Jiang @ 2026-12-02 19:15 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst
Cc: Yige Jiang, Jessica Zhang, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Sam Ravnborg, Tomi Valkeinen,
dri-devel, linux-kernel, stable
dsicm_probe_of() obtains the external backlight with
devm_of_find_backlight(). The returned reference is released by
devm_backlight_release() when the panel driver detaches.
The probe error path and dsicm_remove() still call put_device() on
the external backlight as well. These calls survived the conversion
from of_find_backlight_by_node() and cause the same reference to be
dropped twice. This can free the backlight while its provider still
uses it, including during backlight_device_unregister().
Remove both explicit puts and leave the release to devres.
Fixes: 1efa9eff7b94 ("drm/omap: display: use devm_of_find_backlight")
Cc: stable@vger.kernel.org
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
Based on drm-misc-fixes-2026-11-27.
Compile-tested on next-20261104: arm64, GCC 14.2.0, W=1;
baseline and patched panel-dsi-cm.o built without warnings.
The driver source and code diff are unchanged from that build.
No hardware or runtime test was performed.
drivers/gpu/drm/panel/panel-dsi-cm.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-dsi-cm.c b/drivers/gpu/drm/panel/panel-dsi-cm.c
index ae6e9ffc46cb49ddb53981815ad248953bb37fbb..499ee6a43d8eaa68358d6a9a59745e5b893f7240 100644
--- a/drivers/gpu/drm/panel/panel-dsi-cm.c
+++ b/drivers/gpu/drm/panel/panel-dsi-cm.c
@@ -571,9 +571,6 @@ err_dsi_attach:
drm_panel_remove(&ddata->panel);
sysfs_remove_group(&dsi->dev.kobj, &dsicm_attr_group);
err_bl:
- if (ddata->extbldev)
- put_device(&ddata->extbldev->dev);
-
return r;
}
@@ -588,9 +585,6 @@ static void dsicm_remove(struct mipi_dsi_device *dsi)
drm_panel_remove(&ddata->panel);
sysfs_remove_group(&dsi->dev.kobj, &dsicm_attr_group);
-
- if (ddata->extbldev)
- put_device(&ddata->extbldev->dev);
}
static const struct dsic_panel_data taal_data = {
base-commit: bf57105b00e32d37b666c029c8c6b8708391da20
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-02 19:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 19:15 [PATCH] drm/panel: panel-dsi-cm: Fix double put of external backlight Yige Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox