[PATCH] drm/panel: panel-dsi-cm: Fix double put of external backlight
From: Yige Jiang
Date: Wed Dec 02 2026 - 14:16:02 EST
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@xxxxxxxxxxxxxxx
Signed-off-by: Yige Jiang <yigejiang86@xxxxxxxxx>
---
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