[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220617134213.4049822-1-windhl@126.com>
Date: Fri, 17 Jun 2022 21:42:13 +0800
From: Liang He <windhl@....com>
To: linus.walleij@...aro.org, linux@...linux.org.uk
Cc: windhl@....com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] arm: mach-versatile: Fix refcount leak in v2m
In vexpress_flags_set(), 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-versatile/v2m.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-versatile/v2m.c b/arch/arm/mach-versatile/v2m.c
index 79afdf2a90b6..275f0628aa7e 100644
--- a/arch/arm/mach-versatile/v2m.c
+++ b/arch/arm/mach-versatile/v2m.c
@@ -17,6 +17,7 @@ void vexpress_flags_set(u32 data)
"arm,vexpress-sysreg");
base = of_iomap(node, 0);
+ of_node_put(node);
}
if (WARN_ON(!base))
--
2.25.1
Powered by blists - more mailing lists