Skip to contentSkip to conversation

clk: tegra: Add missing of_node_put in clk-tegra30.c

PATCH Superseded heliang 1 participant 1 message Jun 15, 2022

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

heliang

author
#0 lore raw

PATCH 1/1 clk: tegra: Add missing of_node_put in clk-tegra30.c

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

---
 drivers/clk/tegra/clk-tegra30.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra30.c +1 -0
index 04b496123820..168c07d5a5f2 100644
@@ -1320,6 +1320,7 @@ static void __init tegra30_clock_init(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");
 		BUG();
Signature · 1 line
2.25.1