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

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.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 89ab396d
......@@ -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);
......
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment