From: Miaoqian Lin <linmq006@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: linmq006@gmail.com
Subject: [PATCH] ARM: versatile: Fix refcount leak in ap_init_of
Date: Sun, 5 Jun 2022 12:48:54 +0400 [thread overview]
Message-ID: <20220605084854.29659-1-linmq006@gmail.com> (raw)
of_find_matching_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.
Fixes: e67ae6be734d ("ARM: integrator: hook the AP into the SoC bus")
Fixes: df36680f1a71 ("ARM: integrator: core module registers from compatible strings")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
arch/arm/mach-versatile/integrator_ap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-versatile/integrator_ap.c b/arch/arm/mach-versatile/integrator_ap.c
index e216fac917d0..6b2a69acc6b0 100644
--- a/arch/arm/mach-versatile/integrator_ap.c
+++ b/arch/arm/mach-versatile/integrator_ap.c
@@ -175,6 +175,7 @@ static void __init ap_init_of(void)
if (!syscon)
return;
ap_syscon_map = syscon_node_to_regmap(syscon);
+ of_node_put(syscon);
if (IS_ERR(ap_syscon_map)) {
pr_crit("could not find Integrator/AP system controller\n");
return;
--
2.25.1
next reply other threads:[~2022-06-05 8:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 8:48 Miaoqian Lin [this message]
2022-06-15 13:47 ` Linus Walleij
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=20220605084854.29659-1-linmq006@gmail.com \
--to=linmq006@gmail.com \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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
all inboxes | Powered by JetHome®