Skip to contentSkip to conversation

arch: arm: mach-versatile: Add missing of_node_put()

PATCH Superseded heliang 2 participants 2 messages Jun 15, 2022 – Sep 13, 2023

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

heliang

author
#0 lore raw

PATCH 1/1 arch: arm: mach-versatile: Add missing of_node_put()

In vexpress_smp_dt_prepare_cpus(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.

---
 arch/arm/mach-versatile/platsmp-vexpress.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-versatile/platsmp-vexpress.c +2 -0
index 1ee3c45e71c9..459b5870de59 100644
@@ -66,6 +66,8 @@ static void __init vexpress_smp_dt_prepare_cpus(unsigned int max_cpus)
 
 	if (scu)
 		scu_enable(of_iomap(scu, 0));
+	
+	of_node_put(scu);
 
 	/*
 	 * Write the address of secondary startup into the
Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · heliang

In vexpress_smp_dt_prepare_cpus(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.

Patch applied!

Yours,
Linus Walleij