[PATCH 2/2] ARM: mvebu: simplify of_node_put calls
Martin Kaiser
martin at kaiser.cx
Sat May 2 05:14:27 PDT 2026
In armada_370_coherency_init, cpu_config_np is no longer needed after
of_iomap. We can call of_node_put earlier and summarize the two calls.
Signed-off-by: Martin Kaiser <martin at kaiser.cx>
---
arch/arm/mach-mvebu/coherency.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index a8288a29c1f5..f27b4ec13df2 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -135,12 +135,9 @@ static void __init armada_370_coherency_init(struct device_node *np)
"marvell,armada-xp-cpu-config");
cpu_config_base = of_iomap(cpu_config_np, 0);
- if (!cpu_config_base) {
- of_node_put(cpu_config_np);
- goto exit;
- }
-
of_node_put(cpu_config_np);
+ if (!cpu_config_base)
+ goto exit;
cpuhp_setup_state_nocalls(CPUHP_AP_ARM_MVEBU_COHERENCY,
"arm/mvebu/coherency:starting",
--
2.43.7
More information about the linux-arm-kernel
mailing list