public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare
@ 2024-08-26  5:49 Krzysztof Kozlowski
  2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-26  5:49 UTC (permalink / raw)
  To: Linus Walleij, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Russell King, linux-arm-kernel, linux-kernel
  Cc: Krzysztof Kozlowski

Machine code is leaking OF node reference from of_find_matching_node()
in realview_smp_prepare_cpus().

Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Not Cc-ing stable as this should have almost no impact, except code
correctness.
---
 arch/arm/mach-versatile/platsmp-realview.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-versatile/platsmp-realview.c b/arch/arm/mach-versatile/platsmp-realview.c
index 6965a1de727b..d38b2e174257 100644
--- a/arch/arm/mach-versatile/platsmp-realview.c
+++ b/arch/arm/mach-versatile/platsmp-realview.c
@@ -70,6 +70,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
 		return;
 	}
 	map = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(map)) {
 		pr_err("PLATSMP: No syscon regmap\n");
 		return;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-02  8:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26  5:49 [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Krzysztof Kozlowski
2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-29 12:34   ` Liviu Dudau
2024-08-29 12:33 ` [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Liviu Dudau
2024-08-29 16:23   ` Sudeep Holla
2024-09-02  8:19 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox