Skip to contentSkip to conversation

drivers: tty: serial: Add missing of_node_put() in serial-tegra.c

PATCH New Liang He 1 participant 1 message Jun 15, 2022

Subsystems (4)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 drivers: tty: serial: Add missing of_node_put() in serial-tegra.c

In tegra_uart_init(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.

---
 drivers/tty/serial/serial-tegra.c | 1 +
 1 file changed, 1 insertion(+)
drivers/tty/serial/serial-tegra.c +1 -0
index d942ab152f5a..5c4850a3762c 100644
@@ -1667,6 +1667,7 @@ static int __init tegra_uart_init(void)
 	node = of_find_matching_node(NULL, tegra_uart_of_match);
 	if (node)
 		match = of_match_node(tegra_uart_of_match, node);
+	of_node_put(node);
 	if (match)
 		cdata = match->data;
 	if (cdata)
Signature · 1 line
2.25.1