From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: Amarula patchwork <linux-amarula@amarulasolutions.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Arnd Bergmann <arnd@arndb.de>, Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Russell King <linux@armlinux.org.uk>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM: imx31: add missing of_node_put()
Date: Tue, 6 Dec 2022 18:10:47 +0100 [thread overview]
Message-ID: <20221206171049.3316611-4-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20221206171049.3316611-1-dario.binacchi@amarulasolutions.com>
In mx31_read_cpu_rev(), of_find_compatible_node() returns a node pointer
with refcount incremented. Use of_node_put() on it when done.
Fixes: 3172225d45bd9 ("ARM: imx31: Retrieve the IIM base address from devicetree")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
arch/arm/mach-imx/cpu-imx31.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c
index b9c24b851d1a..35c544924e50 100644
--- a/arch/arm/mach-imx/cpu-imx31.c
+++ b/arch/arm/mach-imx/cpu-imx31.c
@@ -39,6 +39,7 @@ static int mx31_read_cpu_rev(void)
np = of_find_compatible_node(NULL, NULL, "fsl,imx31-iim");
iim_base = of_iomap(np, 0);
+ of_node_put(np);
BUG_ON(!iim_base);
/* read SREV register from IIM module */
--
2.32.0
next prev parent reply other threads:[~2022-12-06 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 17:10 [PATCH 0/5] ARM: imx: " Dario Binacchi
2022-12-06 17:10 ` [PATCH 1/5] ARM: imx25: " Dario Binacchi
2022-12-06 17:10 ` [PATCH 2/5] ARM: imx27: " Dario Binacchi
2022-12-06 17:10 ` Dario Binacchi [this message]
2022-12-06 17:10 ` [PATCH 4/5] ARM: imx35: " Dario Binacchi
2022-12-06 17:10 ` [PATCH 5/5] ARM: imx5: " Dario Binacchi
2022-12-06 21:04 ` [PATCH 0/5] ARM: imx: " Arnd Bergmann
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=20221206171049.3316611-4-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=arnd@arndb.de \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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®