Thread (3 messages) flat view 3 messages, 2 authors, 1d ago
WARM1d

[PATCH] drm/sun4i: Fix pdev reference leak in sun8i_r40_tcon_tv_set_mux()

From: Wentao Liang <hidden>
Date: 2026-09-16 18:24:47
Also in: dri-devel, linux-sunxi, lkml, stable
Subsystem: drm drivers, drm drivers and misc gpu patches, drm drivers for allwinner a10, the rest · Maintainers: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Chen-Yu Tsai, Linus Torvalds

of_find_device_by_node() takes a reference to the TCON TOP device
which the error paths release, but the success path returns without
doing so.  Drop the reference before returning success.

Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <redacted>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 960e83c8291d..07350361fc4b 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -1444,6 +1444,8 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon,
 		}
 	}
 
+	put_device(&pdev->dev);
+
 	return 0;
 }
 
-- 
2.34.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help