* [PATCH v2] clk: tegra: (clk-tegra124) Add missing of_node_put()
@ 2022-06-16 3:31 Liang He
0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-16 3:31 UTC (permalink / raw)
To: pdeschrijver, pgaikwad, mturquette, sboyd, thierry.reding, jonathanh
Cc: linux-clk, linux-tegra, linux-kernel, windhl
In tegra124_132_clock_init_pre, 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>
---
changelog:
v2: use real name
v1: fix missing bug
drivers/clk/tegra/clk-tegra124.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-16 3:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 3:31 [PATCH v2] clk: tegra: (clk-tegra124) Add missing of_node_put() Liang He
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).