Author: marek Date: 2010-05-21 07:29:54 +0200 (Fri, 21 May 2010) New Revision: 1665
Modified: trunk/batman-adv-kernelland/main.c Log: batman-adv: Call unregister_netdev on failures to get rtnl lock
We must call unregister_netdev when we couldn't initialise the batman-adv module and the soft_device was registered. There are two version of the function which we can use: * unregister_netdevice - removes device * unregister_netdev - takes rtnl semaphore and remove device
We don't hold the semaphore in a error case. So we must use unregister_netdev.
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Modified: trunk/batman-adv-kernelland/main.c =================================================================== --- trunk/batman-adv-kernelland/main.c 2010-05-21 04:43:57 UTC (rev 1664) +++ trunk/batman-adv-kernelland/main.c 2010-05-21 05:29:54 UTC (rev 1665) @@ -120,7 +120,7 @@ return 0;
unreg_soft_device: - unregister_netdevice(soft_device); + unregister_netdev(soft_device); free_soft_device: free_netdev(soft_device); soft_device = NULL;