From: Martin Kaiser <martin@kaiser.cx>
To: Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 2/2] ARM: mvebu: simplify of_node_put calls
Date: Sat, 2 May 2026 14:14:27 +0200 [thread overview]
Message-ID: <20260502121438.116288-3-martin@kaiser.cx> (raw)
In-Reply-To: <20260502121438.116288-1-martin@kaiser.cx>
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@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
prev parent reply other threads:[~2026-05-02 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 12:14 [PATCH 0/2] arm: mvebu: two simple cleanups Martin Kaiser
2026-05-02 12:14 ` [PATCH 1/2] ARM: mvebu: drop unnecessary NULL check Martin Kaiser
2026-05-02 12:14 ` Martin Kaiser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260502121438.116288-3-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=andrew@lunn.ch \
--cc=gregory.clement@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox