mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-03 09:34:42 +00:00
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>
This commit is contained in:
parent
eec3546cb9
commit
d54516086d
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user