[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20221218130022.393749-1-martin@kaiser.cx>
Date: Sun, 18 Dec 2022 14:00:21 +0100
From: Martin Kaiser <martin@...ser.cx>
To: Andreas Färber <afaerber@...e.de>,
Manivannan Sadhasivam <mani@...nel.org>,
Russell King <linux@...linux.org.uk>
Cc: Martin Kaiser <martin@...ser.cx>,
linux-arm-kernel@...ts.infradead.org,
linux-actions@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: actions: add missing of_node_put calls
A node that is returned by of_find_compatible_node has its refcount
incremented. We have to call of_node_put when the node is no longer
needed.
Add the missing of_node_put calls in function s500_smp_prepare_cpus.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
compile-tested only, I don't have this hardware
arch/arm/mach-actions/platsmp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c
index f26618b43514..9fe9a0bd0fd0 100644
--- a/arch/arm/mach-actions/platsmp.c
+++ b/arch/arm/mach-actions/platsmp.c
@@ -103,6 +103,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
}
timer_base_addr = of_iomap(node, 0);
+ of_node_put(node);
if (!timer_base_addr) {
pr_err("%s: could not map timer registers\n", __func__);
return;
@@ -115,6 +116,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
}
sps_base_addr = of_iomap(node, 0);
+ of_node_put(node);
if (!sps_base_addr) {
pr_err("%s: could not map sps registers\n", __func__);
return;
@@ -128,6 +130,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus)
}
scu_base_addr = of_iomap(node, 0);
+ of_node_put(node);
if (!scu_base_addr) {
pr_err("%s: could not map scu registers\n", __func__);
return;
--
2.30.2
Powered by blists - more mailing lists