* [PATCH] drm/sun4i: Fix device node reference leak in sun4i_tcon_of_get_id_from_port
@ 2025-10-29 7:49 Miaoqian Lin
2025-10-29 16:00 ` Jernej Škrabec
0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2025-10-29 7:49 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai, Maarten Lankhorst, Thomas Zimmermann,
David Airlie, Simona Vetter, Jernej Skrabec, Samuel Holland,
dri-devel, linux-arm-kernel, linux-sunxi, linux-kernel
Cc: linmq006, stable
Fix a device node reference leak where the remote endpoint node obtained
by of_graph_get_remote_endpoint() was not being properly released.
Add of_node_put() calls after of_property_read_u32() to fix this.
Fixes: e8d5bbf7f4c4 ("drm/sun4i: tcon: get TCON ID and matching engine with remote endpoint ID")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 960e83c8291d..9214769a2857 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -970,6 +970,7 @@ static int sun4i_tcon_of_get_id_from_port(struct device_node *port)
continue;
ret = of_property_read_u32(remote, "reg", ®);
+ of_node_put(remote);
if (ret)
continue;
--
2.39.5 (Apple Git-154)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/sun4i: Fix device node reference leak in sun4i_tcon_of_get_id_from_port
2025-10-29 7:49 [PATCH] drm/sun4i: Fix device node reference leak in sun4i_tcon_of_get_id_from_port Miaoqian Lin
@ 2025-10-29 16:00 ` Jernej Škrabec
0 siblings, 0 replies; 2+ messages in thread
From: Jernej Škrabec @ 2025-10-29 16:00 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai, Maarten Lankhorst, Thomas Zimmermann,
David Airlie, Simona Vetter, Samuel Holland, dri-devel,
linux-arm-kernel, linux-sunxi, linux-kernel, Miaoqian Lin
Cc: linmq006, stable
Dne sreda, 29. oktober 2025 ob 08:49:10 Srednjeevropski standardni čas je Miaoqian Lin napisal(a):
> Fix a device node reference leak where the remote endpoint node obtained
> by of_graph_get_remote_endpoint() was not being properly released.
>
> Add of_node_put() calls after of_property_read_u32() to fix this.
>
> Fixes: e8d5bbf7f4c4 ("drm/sun4i: tcon: get TCON ID and matching engine with remote endpoint ID")
> Cc: stable@vger.kernel.org
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-29 16:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 7:49 [PATCH] drm/sun4i: Fix device node reference leak in sun4i_tcon_of_get_id_from_port Miaoqian Lin
2025-10-29 16:00 ` Jernej Škrabec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).