Skip to contentSkip to conversation

drm/arc: Fix refcount leak in arcpgu_load

PATCH New Miaoqian Lin 1 participant 1 message May 30, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/arc: Fix refcount leak in arcpgu_load

of_graph_get_remote_port_parent() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.

Fixes 3ea66a794fdc ("drm/arc: Inline arcpgu_drm_hdmi_init")
---
 drivers/gpu/drm/tiny/arcpgu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/tiny/arcpgu.c +1 -0
index f0fa3b15c341..6cbc4e9d382e 100644
@@ -310,6 +310,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu)
 
 		/* Locate drm bridge from the hdmi encoder DT node */
 		bridge = of_drm_find_bridge(encoder_node);
+		of_node_put(encoder_node);
 		if (!bridge)
 			return -EPROBE_DEFER;
 
Signature · 1 line
2.25.1