mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm: mach-versatile: Fix refcount leak in v2m
@ 2022-06-17 13:42 Liang He
  0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-17 13:42 UTC (permalink / raw)
  To: linus.walleij, linux; +Cc: windhl, linux-arm-kernel, linux-kernel

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@126.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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-17 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 13:42 [PATCH] arm: mach-versatile: Fix refcount leak in v2m Liang He

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®