Skip to contentSkip to conversation

clk: tegra: (clk-tegra124) Add missing of_node_put()

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

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH v2 1/1 clk: tegra: (clk-tegra124) Add missing of_node_put()

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

---
changelog:

v2: use real name
v1: fix missing bug

 drivers/clk/tegra/clk-tegra124.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra124.c +1 -0
index 934520aab6e3..a9d4efcef2d4 100644
@@ -1471,6 +1471,7 @@ static void __init tegra124_132_clock_init_pre(struct device_node *np)
 	}
 
 	pmc_base = of_iomap(node, 0);
+	of_node_put(node);
 	if (!pmc_base) {
 		pr_err("Can't map pmc registers\n");
 		WARN_ON(1);
Signature · 1 line
2.25.1