From: Sven Eckelmann Date: Sat, 22 May 2010 15:48:46 +0000 (+0200) Subject: Staging: batman-adv: Don't call free_netdev twice X-Git-Tag: firefly_0821_release~9833^2~1561^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3d9b2358930a3e5225b28ac1458236f3d667e368;p=firefly-linux-kernel-4.4.55.git Staging: batman-adv: Don't call free_netdev twice Free_netdev is registered as destructor in interface_setup for every soft_device. This destructor is automatically called from unregister_netdev and we must not call it again for the freed net_device. Signed-off-by: Sven Eckelmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 50a66b42d476..74c70d589a93 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -128,6 +128,9 @@ int init_module(void) unreg_soft_device: unregister_netdev(soft_device); + soft_device = NULL; + return -ENOMEM; + free_soft_device: free_netdev(soft_device); soft_device = NULL;