[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221206171049.3316611-6-dario.binacchi@amarulasolutions.com>
Date: Tue, 6 Dec 2022 18:10:49 +0100
From: Dario Binacchi <dario.binacchi@...rulasolutions.com>
To: linux-kernel@...r.kernel.org
Cc: Amarula patchwork <linux-amarula@...rulasolutions.com>,
Dario Binacchi <dario.binacchi@...rulasolutions.com>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Russell King <linux@...linux.org.uk>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH 5/5] ARM: imx5: add missing of_node_put()
In imx5_read_srev_reg(), of_find_compatible_node() returns a node pointer
with refcount incremented. Use of_node_put() on it when done.
Fixes: ee18a7154ee08 ("ARM: imx5: retrieve iim base from device tree")
Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
---
arch/arm/mach-imx/cpu-imx5.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
index ad56263778f9..a67c89bf155d 100644
--- a/arch/arm/mach-imx/cpu-imx5.c
+++ b/arch/arm/mach-imx/cpu-imx5.c
@@ -28,6 +28,7 @@ static u32 imx5_read_srev_reg(const char *compat)
np = of_find_compatible_node(NULL, NULL, compat);
iim_base = of_iomap(np, 0);
+ of_node_put(np);
WARN_ON(!iim_base);
srev = readl(iim_base + IIM_SREV) & 0xff;
--
2.32.0
Powered by blists - more mailing lists