diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 13 | ||||
-rw-r--r-- | net/ipv4/ip_gre.c | 3 | ||||
-rw-r--r-- | net/ipv4/ipip.c | 3 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 3 | ||||
-rw-r--r-- | net/ipv6/sit.c | 3 |
5 files changed, 13 insertions, 12 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 455d589683e8..1e94a1b9a0f4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3247,7 +3247,7 @@ void synchronize_net(void) | |||
3247 | * unregister_netdev() instead of this. | 3247 | * unregister_netdev() instead of this. |
3248 | */ | 3248 | */ |
3249 | 3249 | ||
3250 | int unregister_netdevice(struct net_device *dev) | 3250 | void unregister_netdevice(struct net_device *dev) |
3251 | { | 3251 | { |
3252 | struct net_device *d, **dp; | 3252 | struct net_device *d, **dp; |
3253 | 3253 | ||
@@ -3258,7 +3258,9 @@ int unregister_netdevice(struct net_device *dev) | |||
3258 | if (dev->reg_state == NETREG_UNINITIALIZED) { | 3258 | if (dev->reg_state == NETREG_UNINITIALIZED) { |
3259 | printk(KERN_DEBUG "unregister_netdevice: device %s/%p never " | 3259 | printk(KERN_DEBUG "unregister_netdevice: device %s/%p never " |
3260 | "was registered\n", dev->name, dev); | 3260 | "was registered\n", dev->name, dev); |
3261 | return -ENODEV; | 3261 | |
3262 | WARN_ON(1); | ||
3263 | return; | ||
3262 | } | 3264 | } |
3263 | 3265 | ||
3264 | BUG_ON(dev->reg_state != NETREG_REGISTERED); | 3266 | BUG_ON(dev->reg_state != NETREG_REGISTERED); |
@@ -3280,11 +3282,7 @@ int unregister_netdevice(struct net_device *dev) | |||
3280 | break; | 3282 | break; |
3281 | } | 3283 | } |
3282 | } | 3284 | } |
3283 | if (!d) { | 3285 | BUG_ON(!d); |
3284 | printk(KERN_ERR "unregister net_device: '%s' not found\n", | ||
3285 | dev->name); | ||
3286 | return -ENODEV; | ||
3287 | } | ||
3288 | 3286 | ||
3289 | dev->reg_state = NETREG_UNREGISTERING; | 3287 | dev->reg_state = NETREG_UNREGISTERING; |
3290 | 3288 | ||
@@ -3316,7 +3314,6 @@ int unregister_netdevice(struct net_device *dev) | |||
3316 | synchronize_net(); | 3314 | synchronize_net(); |
3317 | 3315 | ||
3318 | dev_put(dev); | 3316 | dev_put(dev); |
3319 | return 0; | ||
3320 | } | 3317 | } |
3321 | 3318 | ||
3322 | /** | 3319 | /** |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 476cb6084c75..51c83500790f 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -1008,7 +1008,8 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1008 | goto done; | 1008 | goto done; |
1009 | dev = t->dev; | 1009 | dev = t->dev; |
1010 | } | 1010 | } |
1011 | err = unregister_netdevice(dev); | 1011 | unregister_netdevice(dev); |
1012 | err = 0; | ||
1012 | break; | 1013 | break; |
1013 | 1014 | ||
1014 | default: | 1015 | default: |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 9d719d664e5b..da8bbd20c7ed 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -754,7 +754,8 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) | |||
754 | goto done; | 754 | goto done; |
755 | dev = t->dev; | 755 | dev = t->dev; |
756 | } | 756 | } |
757 | err = unregister_netdevice(dev); | 757 | unregister_netdevice(dev); |
758 | err = 0; | ||
758 | break; | 759 | break; |
759 | 760 | ||
760 | default: | 761 | default: |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 8d918348f5bb..2b9e3bb7da65 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -999,7 +999,8 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
999 | break; | 999 | break; |
1000 | dev = t->dev; | 1000 | dev = t->dev; |
1001 | } | 1001 | } |
1002 | err = unregister_netdevice(dev); | 1002 | err = 0; |
1003 | unregister_netdevice(dev); | ||
1003 | break; | 1004 | break; |
1004 | default: | 1005 | default: |
1005 | err = -EINVAL; | 1006 | err = -EINVAL; |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 77b7b0911438..47cfeadac6dd 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -686,7 +686,8 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) | |||
686 | goto done; | 686 | goto done; |
687 | dev = t->dev; | 687 | dev = t->dev; |
688 | } | 688 | } |
689 | err = unregister_netdevice(dev); | 689 | unregister_netdevice(dev); |
690 | err = 0; | ||
690 | break; | 691 | break; |
691 | 692 | ||
692 | default: | 693 | default: |