diff options
author | Andrey Shvetsov <andrey.shvetsov@k2l.de> | 2017-05-12 13:59:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-15 12:59:10 +0300 |
commit | d54516086d95c8f2bd67716f54932e3fd3a904b8 (patch) | |
tree | 94ab1bd18747ea3d9c3e22ffd02eec214ab64ae2 /drivers/staging/most | |
parent | eec3546cb92a5dbb84e817692d306a5db6e6f416 (diff) | |
download | linux-d54516086d95c8f2bd67716f54932e3fd3a904b8.tar.xz |
staging: most: net: remove redundant cleanup code
This removes redundant cleanup code that is executed anyway when the
most_deregister_aim() is called.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/aim-network/networking.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/aim-network/networking.c index 11f03d3cd565..e2935ccd5b09 100644 --- a/drivers/staging/most/aim-network/networking.c +++ b/drivers/staging/most/aim-network/networking.c @@ -509,25 +509,8 @@ static int __init most_net_init(void) static void __exit most_net_exit(void) { - struct net_dev_context *nd, *tmp; - unsigned long flags; - - spin_lock_irqsave(&list_lock, flags); - list_for_each_entry_safe(nd, tmp, &net_devices, list) { - list_del(&nd->list); - spin_unlock_irqrestore(&list_lock, flags); - /* - * do not call most_stop_channel() here, because channels are - * going to be closed in ndo_stop() after unregister_netdev() - */ - most_net_rm_netdev_safe(nd); - kfree(nd); - spin_lock_irqsave(&list_lock, flags); - } - spin_unlock_irqrestore(&list_lock, flags); - - most_deregister_aim(&aim); pr_info("most_net_exit()\n"); + most_deregister_aim(&aim); } /** |