Thread (1 message) 1 message, 1 author, 2016-02-08

[PATCH] ARM: mvebu: add missing of_node_put()

From: Gregory CLEMENT <hidden>
Date: 2016-02-08 16:31:33
Also in: lkml

Hi Masahiro,
 
 On lun., f?vr. 08 2016, Masahiro Yamada [off-list ref] wrote:
This node pointer is returned by of_find_compatible_node() in this
function.  It should be put before exitting this function.
Applied on mvebu/cleanup

Thanks,

Gregory
quoted hunk
Signed-off-by: Masahiro Yamada <redacted>
---

 arch/arm/mach-mvebu/platsmp.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index f9597b7..46c742d 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -140,6 +140,7 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
 		panic("Cannot find 'marvell,bootrom' compatible node");
 
 	err = of_address_to_resource(node, 0, &res);
+	of_node_put(node);
 	if (err < 0)
 		panic("Cannot get 'bootrom' node address");
 
-- 
1.9.1
-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help