Commit 02bd544f authored by Liang He's avatar Liang He Committed by Stephen Boyd
Browse files

clk: tegra: Add missing of_node_put()



In tegra124_132_clock_init_pre() and tegra30_clock_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.

Signed-off-by: default avatarLiang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220617015918.4001865-1-windhl@126.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 89ab396d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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();