ARM: mvebu: add missing of_node_put()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 8 Feb 2016 06:17:12 +0000 (15:17 +0900)
committerGregory CLEMENT <gregory.clement@free-electrons.com>
Mon, 8 Feb 2016 16:30:14 +0000 (17:30 +0100)
This node pointer is returned by of_find_compatible_node() in this
function.  It should be put before exitting this function.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
arch/arm/mach-mvebu/platsmp.c

index f9597b701028a107d6acc11ce481fcaddc5e0411..46c742d3bd41e65c0f0fbaa2fc5cb8d3561b0c0a 100644 (file)
@@ -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");