diff options
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r-- | net/8021q/vlan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index c0c7bb8e9f07..bd93c45778d4 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -117,8 +117,7 @@ static void __exit vlan_cleanup_devices(void) | |||
117 | struct net_device *dev, *nxt; | 117 | struct net_device *dev, *nxt; |
118 | 118 | ||
119 | rtnl_lock(); | 119 | rtnl_lock(); |
120 | for (dev = dev_base; dev; dev = nxt) { | 120 | for_each_netdev_safe(dev, nxt) { |
121 | nxt = dev->next; | ||
122 | if (dev->priv_flags & IFF_802_1Q_VLAN) { | 121 | if (dev->priv_flags & IFF_802_1Q_VLAN) { |
123 | unregister_vlan_dev(VLAN_DEV_INFO(dev)->real_dev, | 122 | unregister_vlan_dev(VLAN_DEV_INFO(dev)->real_dev, |
124 | VLAN_DEV_INFO(dev)->vlan_id); | 123 | VLAN_DEV_INFO(dev)->vlan_id); |