Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: imx8mp-hdmi-pvi: Fix next_bridge reference leak
@ 2026-09-16 10:11 Wentao Liang
  0 siblings, 0 replies; only message in thread
From: Wentao Liang @ 2026-09-16 10:11 UTC (permalink / raw)
  To: Frank.Li
  Cc: Laurent.pinchart, airlied, andrzej.hajda, dri-devel, festevam,
	imx, jernej.skrabec, jonas, kernel, linux-arm-kernel,
	linux-kernel, luca.ceresoli, maarten.lankhorst, mripard,
	neil.armstrong, rfoss, s.hauer, simona, tzimmermann, victor.liu,
	Wentao Liang

imx8mp_hdmi_pvi_probe() takes a reference to the next bridge in the
pipeline with of_drm_find_and_get_bridge() and stores it in
pvi->bridge.next_bridge, but the reference is never released, leaking
the bridge on driver unbind.  Drop the reference in
imx8mp_hdmi_pvi_remove() once the bridge has been unregistered.

Fixes: 7654c807f207 ("drm/bridge: imx8mp-hdmi-pvi: convert to of_drm_find_and_get_bridge()")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c
index 15fbb1be07cd..80e33d810a69 100644
--- a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c
+++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c
@@ -179,6 +179,7 @@ static void imx8mp_hdmi_pvi_remove(struct platform_device *pdev)
 	struct imx8mp_hdmi_pvi *pvi = platform_get_drvdata(pdev);
 
 	drm_bridge_remove(&pvi->bridge);
+	drm_bridge_put(pvi->bridge.next_bridge);
 
 	pm_runtime_disable(&pdev->dev);
 }
-- 
2.34.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-16 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 10:11 [PATCH] drm/bridge: imx8mp-hdmi-pvi: Fix next_bridge reference leak Wentao Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox