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: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220617015918.4001865-1-windhl@126.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
Liang He 2022-06-17 09:59:18 +08:00 committed by Stephen Boyd
parent 89ab396d71
commit 02bd544f98
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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();