All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: lt8912b: Fix next_bridge reference leak in lt8912_parse_dt()
@ 2026-09-16 10:14 Wentao Liang
  2026-09-16 10:24 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2026-09-16 10:14 UTC (permalink / raw)
  To: Laurent.pinchart
  Cc: adrien.grassein, airlied, andrzej.hajda, dri-devel,
	jernej.skrabec, jonas, linux-kernel, luca.ceresoli,
	maarten.lankhorst, mripard, neil.armstrong, rfoss, simona,
	tzimmermann, Wentao Liang

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-16 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 10:14 [PATCH] drm/bridge: lt8912b: Fix next_bridge reference leak in lt8912_parse_dt() Wentao Liang
2026-09-16 10:24 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.