mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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:
parent
89ab396d71
commit
02bd544f98
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user