[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220512020641.45156-1-linmq006@gmail.com>
Date: Thu, 12 May 2022 06:06:39 +0400
From: Miaoqian Lin <linmq006@...il.com>
To: Russell King <linux@...linux.org.uk>,
Miaoqian Lin <linmq006@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Anders Berg <anders.berg@....com>,
Arnd Bergmann <arnd@...db.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: Fix refcount leak in axxia_boot_secondary
of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.
Fixes: 1d22924e1c4e ("ARM: Add platform support for LSI AXM55xx SoC")
Signed-off-by: Miaoqian Lin <linmq006@...il.com>
---
arch/arm/mach-axxia/platsmp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index 512943eae30a..2e203626eda5 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -39,6 +39,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
return -ENOENT;
syscon = of_iomap(syscon_np, 0);
+ of_node_put(syscon_np);
if (!syscon)
return -ENOMEM;
--
2.25.1
Powered by blists - more mailing lists