Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328785 > unrolled thread

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

Started byMasahiro Yamada <yamada.masahiro@socionext.com>
First post2016-02-08 07:20 +0100
Last post2016-02-08 17:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: mvebu: add missing of_node_put() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-02-08 07:20 +0100
    Re: [PATCH] ARM: mvebu: add missing of_node_put() Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-02-08 17:40 +0100

#1328785 — [PATCH] ARM: mvebu: add missing of_node_put()

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-02-08 07:20 +0100
Subject[PATCH] ARM: mvebu: add missing of_node_put()
Message-ID<qZNkZ-18B-13@gated-at.bofh.it>
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>
---

 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

[toc] | [next] | [standalone]


#1329280

FromGregory CLEMENT <gregory.clement@free-electrons.com>
Date2016-02-08 17:40 +0100
Message-ID<qZX10-7Mz-11@gated-at.bofh.it>
In reply to#1328785
Hi Masahiro,
 
 On lun., févr. 08 2016, Masahiro Yamada <yamada.masahiro@socionext.com> 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

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web