From: Andrey Shvetsov Date: Fri, 12 May 2017 10:59:56 +0000 (+0200) Subject: staging: most: net: remove redundant cleanup code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d54516086d95c8f2bd67716f54932e3fd3a904b8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- 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); } /**