From: zhong jiang Date: Sat, 4 Aug 2018 14:25:00 +0000 (+0800) Subject: powerpc/powermac: of_node_put() is not needed after iterator X-Git-Tag: v4.19-rc1~110^2~37 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=81d7b08b3cec79a43411e7175401b369090dba29;p=users%2Fjedix%2Flinux-maple.git powerpc/powermac: of_node_put() is not needed after iterator 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 Reviewed-by: Tyrel Datwyler Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index 3f82cb24eb2b..4eb8cb38fc69 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -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