From: Yige Jiang <yigejiang86@gmail.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Yige Jiang <yigejiang86@gmail.com>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Sam Ravnborg <sam@ravnborg.org>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: [PATCH] drm/panel: panel-dsi-cm: Fix double put of external backlight
Date: Thu, 3 Dec 2026 03:15:33 +0800 [thread overview]
Message-ID: <20261202230210.3dd14d92d006.panel-dsi-cm@gmail.com> (raw)
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
reply other threads:[~2026-12-02 19:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202230210.3dd14d92d006.panel-dsi-cm@gmail.com \
--to=yigejiang86@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox