drm/sun4i: tcon: Fix refcount leak bug in sun4i_tcon_of_get_id_from_port()
PATCH 1/1 drm/sun4i: tcon: Fix refcount leak bug in sun4i_tcon_of_get_id_from_port()
We should call of_node_put() for the reference returned by of_graph_get_remote_endpoint() when it is not used anymore.
Fixes e8d5bbf7f4c4 ("drm/sun4i: tcon: get TCON ID and matching engine with remote endpoint ID")
Signed-off-by Liang He <[email protected]>
--- drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/sun4i/sun4i_tcon.c +1 -0
@@ -972,6 +972,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 ;
Signature · 1 line
2.25.1