linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Yangtao Li <tiny.windzz@gmail.com>,
	Stephen Boyd <sboyd@kernel.org>, Sasha Levin <sashal@kernel.org>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 4.4 026/174] clk: vf610: fix refcount leak in vf610_clocks_init()
Date: Thu, 16 Jan 2020 12:40:23 -0500	[thread overview]
Message-ID: <20200116174251.24326-26-sashal@kernel.org> (raw)
In-Reply-To: <20200116174251.24326-1-sashal@kernel.org>

From: Yangtao Li <tiny.windzz@gmail.com>

[ Upstream commit 567177024e0313e4f0dcba7ba10c0732e50e655d ]

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>
Fixes: 1f2c5fd5f048 ("ARM: imx: add VF610 clock support")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/clk/imx/clk-vf610.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
index 0a94d9661d91..2c92a2706fdd 100644
--- a/drivers/clk/imx/clk-vf610.c
+++ b/drivers/clk/imx/clk-vf610.c
@@ -155,6 +155,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 	np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop");
 	anatop_base = of_iomap(np, 0);
 	BUG_ON(!anatop_base);
+	of_node_put(np);
 
 	np = ccm_node;
 	ccm_base = of_iomap(np, 0);
-- 
2.20.1


  parent reply	other threads:[~2020-01-16 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200116174251.24326-1-sashal@kernel.org>
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 019/174] clk: highbank: fix refcount leak in hb_clk_init() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 020/174] clk: qoriq: fix refcount leak in clockgen_init() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 021/174] clk: socfpga: fix refcount leak Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 022/174] clk: samsung: exynos4: fix refcount leak in exynos4_get_xom() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 023/174] clk: imx6q: fix refcount leak in imx6q_clocks_init() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 024/174] clk: imx6sx: fix refcount leak in imx6sx_clocks_init() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 025/174] clk: imx7d: fix refcount leak in imx7d_clocks_init() Sasha Levin
2020-01-16 17:40 ` Sasha Levin [this message]
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 027/174] clk: armada-370: fix refcount leak in a370_clk_init() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 028/174] clk: kirkwood: fix refcount leak in kirkwood_clk_init() Sasha Levin
2020-01-16 17:40 ` [PATCH AUTOSEL 4.4 029/174] clk: armada-xp: fix refcount leak in axp_clk_init() Sasha Levin
2020-01-16 17:42 ` [PATCH AUTOSEL 4.4 159/174] clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200116174251.24326-26-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiny.windzz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).