lkml.org 
[lkml]   [2018]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] powpc:feature: of_node_put is not needed after iterator.
From
Date
On 08/04/2018 07:25 AM, zhong jiang wrote:
> for_each_node_by_name iterators only exit normally when the loop
> cursor is NULL, So there is no point to call of_node_put.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

> ---
> arch/powerpc/platforms/powermac/feature.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
> index 3f82cb2..4eb8cb3 100644
> --- a/arch/powerpc/platforms/powermac/feature.c
> +++ b/arch/powerpc/platforms/powermac/feature.c
> @@ -2889,10 +2889,8 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
> /* On all machines, switch modem & serial ports off */
> for_each_node_by_name(np, "ch-a")
> initial_serial_shutdown(np);
> - of_node_put(np);
> for_each_node_by_name(np, "ch-b")
> initial_serial_shutdown(np);
> - of_node_put(np);
> }
>
> void __init
>

\
 
 \ /
  Last update: 2018-08-04 22:38    [W:0.059 / U:2.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site