Subject: [PATCH 2/2] ARM: mvebu: simplify of_node_put calls

From: Martin Kaiser <[email-masked]>
Date: Sat, 2 May 2026 14:14:27 +0200

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 <[email-masked]>
---
 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