aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRongQing.Li <roy.qing.li@gmail.com>2011-11-30 23:43:07 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-30 23:43:07 -0500
commit8f891489866ec62a87494eff3ed17c88152c32d4 (patch)
treea3baca724faed04898f72e3e512f76892a1b05ce
parentea6a5d3b97b768561db6358f15e4c84ced0f4f7e (diff)
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 <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1482eea0bbf0..5a13edfc9f73 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1396,7 +1396,7 @@ rollback:
1396 for_each_net(net) { 1396 for_each_net(net) {
1397 for_each_netdev(net, dev) { 1397 for_each_netdev(net, dev) {
1398 if (dev == last) 1398 if (dev == last)
1399 break; 1399 goto outroll;
1400 1400
1401 if (dev->flags & IFF_UP) { 1401 if (dev->flags & IFF_UP) {
1402 nb->notifier_call(nb, NETDEV_GOING_DOWN, dev); 1402 nb->notifier_call(nb, NETDEV_GOING_DOWN, dev);
@@ -1407,6 +1407,7 @@ rollback:
1407 } 1407 }
1408 } 1408 }
1409 1409
1410outroll:
1410 raw_notifier_chain_unregister(&netdev_chain, nb); 1411 raw_notifier_chain_unregister(&netdev_chain, nb);
1411 goto unlock; 1412 goto unlock;
1412} 1413}