linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
@ 2018-12-26 13:32 Yangtao Li
  2018-12-28 19:35 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-12-26 13:32 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, cw00.choi, mturquette, sboyd, kgene, krzk
  Cc: linux-samsung-soc, linux-clk, linux-arm-kernel, linux-kernel, Yangtao Li

The of_find_compatible_node() returns a node pointer with refcount
incremented, but there is the lack of use of the of_node_put() when
done. Add the missing of_node_put() to release the refcount.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/clk/samsung/clk-exynos4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index 59d4d46667ce..54066e6508d3 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -1028,6 +1028,7 @@ static unsigned long __init exynos4_get_xom(void)
 			xom = readl(chipid_base + 8);
 
 		iounmap(chipid_base);
+		of_node_put(np);
 	}
 
 	return xom;
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
  2018-12-26 13:32 [PATCH] clk: samsung: exynos4: fix refcount leak in exynos4_get_xom() Yangtao Li
@ 2018-12-28 19:35 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2018-12-28 19:35 UTC (permalink / raw)
  To: Yangtao Li, cw00.choi, kgene, krzk, mturquette, s.nawrocki, tomasz.figa
  Cc: linux-samsung-soc, linux-clk, linux-arm-kernel, linux-kernel, Yangtao Li

Quoting Yangtao Li (2018-12-26 05:32:15)
> The of_find_compatible_node() returns a node pointer with refcount
> incremented, but there is the lack of use of the of_node_put() when
> done. Add the missing of_node_put() to release the refcount.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---

Applied to clk-next


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-28 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26 13:32 [PATCH] clk: samsung: exynos4: fix refcount leak in exynos4_get_xom() Yangtao Li
2018-12-28 19:35 ` Stephen Boyd

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).