[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220615145743.3969705-1-windhl@126.com>
Date: Wed, 15 Jun 2022 22:57:43 +0800
From: Liang He <windhl@....com>
To: linux@...linux.org.uk, shawnguo@...nel.org, s.hauer@...gutronix.de,
kernel@...gutronix.de, festevam@...il.com, linux-imx@....com
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
windhl@....com
Subject: [PATCH] arm: mach-imx: Add missing of_node_put() in cpu-imx5.c
In imx5_read_srev_reg(), of_find_compatible_node() will return a
node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.
Signed-off-by: Liang He <windhl@....com>
---
arch/arm/mach-imx/cpu-imx5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
index ad56263778f9..103bf5be9b1b 100644
--- a/arch/arm/mach-imx/cpu-imx5.c
+++ b/arch/arm/mach-imx/cpu-imx5.c
@@ -30,6 +30,8 @@ static u32 imx5_read_srev_reg(const char *compat)
iim_base = of_iomap(np, 0);
WARN_ON(!iim_base);
+ of_node_put(np);
+
srev = readl(iim_base + IIM_SREV) & 0xff;
iounmap(iim_base);
--
2.25.1
Powered by blists - more mailing lists