Commit d5451608 authored by Andrey Shvetsov's avatar Andrey Shvetsov Committed by Greg Kroah-Hartman

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: default avatarAndrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eec3546c
......@@ -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);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment