Skip to content

Commit 02bd544

Browse files
windhlbebarino
authored andcommitted
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>
1 parent 89ab396 commit 02bd544

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/clk/tegra/clk-tegra124.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,7 @@ static void __init tegra124_132_clock_init_pre(struct device_node *np)
14711471
}
14721472

14731473
pmc_base = of_iomap(node, 0);
1474+
of_node_put(node);
14741475
if (!pmc_base) {
14751476
pr_err("Can't map pmc registers\n");
14761477
WARN_ON(1);

drivers/clk/tegra/clk-tegra30.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,7 @@ static void __init tegra30_clock_init(struct device_node *np)
13201320
}
13211321

13221322
pmc_base = of_iomap(node, 0);
1323+
of_node_put(node);
13231324
if (!pmc_base) {
13241325
pr_err("Can't map pmc registers\n");
13251326
BUG();

0 commit comments

Comments
 (0)