Skip to content

Commit

Permalink
powerpc/powermac: of_node_put() is not needed after iterator
Browse files Browse the repository at this point in the history
for_each_node_by_name() iterators only exit normally when the loop
cursor is NULL, So there is no need to call of_node_put().

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
zhong jiang authored and Michael Ellerman committed Aug 7, 2018
1 parent 656ecc1 commit 81d7b08
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/platforms/powermac/feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -2889,10 +2889,8 @@ set_initial_features(void)
/* 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
Expand Down

0 comments on commit 81d7b08

Please sign in to comment.