From: RongQing.Li Date: Thu, 1 Dec 2011 04:43:07 +0000 (-0500) Subject: net/core: fix rollback handler in register_netdevice_notifier X-Git-Tag: upstream/snapshot3+hdmi~8634^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f891489866ec62a87494eff3ed17c88152c32d4;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git net/core: fix rollback handler in register_netdevice_notifier Within nested statements, the break statement terminates only the do, for, switch, or while statement that immediately encloses it, So replace the break with goto. Signed-off-by: RongQing.Li Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 1482eea..5a13edf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1396,7 +1396,7 @@ rollback: for_each_net(net) { for_each_netdev(net, dev) { if (dev == last) - break; + goto outroll; if (dev->flags & IFF_UP) { nb->notifier_call(nb, NETDEV_GOING_DOWN, dev); @@ -1407,6 +1407,7 @@ rollback: } } +outroll: raw_notifier_chain_unregister(&netdev_chain, nb); goto unlock; }