diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/veth.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 43af9e9b2652..3f67a29593bc 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -459,19 +459,7 @@ static __init int veth_init(void) | |||
459 | 459 | ||
460 | static __exit void veth_exit(void) | 460 | static __exit void veth_exit(void) |
461 | { | 461 | { |
462 | struct veth_priv *priv, *next; | 462 | rtnl_link_unregister(&veth_link_ops); |
463 | |||
464 | rtnl_lock(); | ||
465 | /* | ||
466 | * cannot trust __rtnl_link_unregister() to unregister all | ||
467 | * devices, as each ->dellink call will remove two devices | ||
468 | * from the list at once. | ||
469 | */ | ||
470 | list_for_each_entry_safe(priv, next, &veth_list, list) | ||
471 | veth_dellink(priv->dev); | ||
472 | |||
473 | __rtnl_link_unregister(&veth_link_ops); | ||
474 | rtnl_unlock(); | ||
475 | } | 463 | } |
476 | 464 | ||
477 | module_init(veth_init); | 465 | module_init(veth_init); |