clk: tegra: Add missing of_node_put()
Subsystems (3)
PATCH v4 1/1 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 <[email protected]>
---
changelog:
v4: split v3 into nomadik and tegra
v3: merge clk 'missing of_node_put()' patches into one commit.
v2: use Liang He as real name for S-o-b.
v1: fix the missing of_node_put().
drivers/clk/tegra/clk-tegra124.c | 1 + drivers/clk/tegra/clk-tegra30.c | 1 + 2 files changed, 2 insertions(+)
drivers/clk/tegra/clk-tegra124.c +1 -0
@@ -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 );
drivers/clk/tegra/clk-tegra30.c +1 -0
@@ -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 ();
Signature · 1 line
2.25.1
Quoting Liang He (2022-06-16 18:59:18)
Quoted 7 lines
In
tegra124_132_clock_init_pre()andtegra30_clock_init(),of_find_matching_node()will return a node pointer with refcount incremented. We should useof_node_put()when it is not used anymore.Signed-off-by Liang He <[email protected]>---
Applied to clk-next