diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2007-02-07 03:09:58 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-08 15:39:06 -0500 |
commit | 22f8cde5bc336fd19603bb8c4572b33d14f14f87 (patch) | |
tree | 7a566269b9d294a1a90e8368a005e1b3fbc5e984 /net/core/dev.c | |
parent | f48d5ff1e44562a0ee87ce8ea3b798ce9d84370d (diff) |
[NET]: unregister_netdevice as void
There was no real useful information from the unregister_netdevice() return
code, the only error occurred in a situation that was a driver bug. So
change it to a void function.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 13 |
1 files changed, 5 insertions, 8 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 | /** |