diff options
author | Liang He <windhl@126.com> | 2022-06-17 04:59:18 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-08-20 00:30:28 +0300 |
commit | 02bd544f98ae96e2f8fde759696f725f0966cce6 (patch) | |
tree | 519a58e8b0188628127ee4380412f31174fa680d | |
parent | 89ab396d712f7c91fe94f55cff23460426f5fc81 (diff) | |
download | linux-02bd544f98ae96e2f8fde759696f725f0966cce6.tar.xz |
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>
-rw-r--r-- | drivers/clk/tegra/clk-tegra124.c | 1 | ||||
-rw-r--r-- | drivers/clk/tegra/clk-tegra30.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c index 934520aab6e3..a9d4efcef2d4 100644 --- a/drivers/clk/tegra/clk-tegra124.c +++ b/drivers/clk/tegra/clk-tegra124.c @@ -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); diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c index 04b496123820..168c07d5a5f2 100644 --- a/drivers/clk/tegra/clk-tegra30.c +++ b/drivers/clk/tegra/clk-tegra30.c @@ -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(); |