From: Wentao Liang <vulab@iscas.ac.cn>
To: Laurent.pinchart@ideasonboard.com
Cc: adrien.grassein@gmail.com, airlied@gmail.com,
andrzej.hajda@intel.com, dri-devel@lists.freedesktop.org,
jernej.skrabec@gmail.com, jonas@kwiboo.se,
linux-kernel@vger.kernel.org, luca.ceresoli@bootlin.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
neil.armstrong@linaro.org, rfoss@kernel.org, simona@ffwll.ch,
tzimmermann@suse.de, Wentao Liang <vulab@iscas.ac.cn>
Subject: [PATCH] drm/bridge: lt8912b: Fix next_bridge reference leak in lt8912_parse_dt()
Date: Wed, 16 Sep 2026 10:14:01 +0000 [thread overview]
Message-ID: <20260916101401.2017498-1-vulab@iscas.ac.cn> (raw)
lt8912_parse_dt() takes a reference to the next bridge in the
pipeline with of_drm_find_and_get_bridge() and stores it in
lt->bridge.next_bridge, but neither the error paths after the lookup
nor the driver teardown release it. Drop the reference in the
err_free_host_node label and in lt8912_put_dt().
Fixes: 31cb3cd7e714 ("drm/bridge: lt8912b: convert to of_drm_find_and_get_bridge()")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/gpu/drm/bridge/lontium-lt8912b.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
index 8a0b48efca58..fa6cdad3f517 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -743,6 +743,7 @@ static int lt8912_parse_dt(struct lt8912 *lt)
return 0;
err_free_host_node:
+ drm_bridge_put(lt->bridge.next_bridge);
of_node_put(port_node);
of_node_put(lt->host_node);
return ret;
@@ -750,6 +751,7 @@ static int lt8912_parse_dt(struct lt8912 *lt)
static int lt8912_put_dt(struct lt8912 *lt)
{
+ drm_bridge_put(lt->bridge.next_bridge);
of_node_put(lt->host_node);
return 0;
}
--
2.34.1
reply other threads:[~2026-09-16 10:14 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=20260916101401.2017498-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=adrien.grassein@gmail.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--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
all inboxes | Powered by JetHome®