aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@gmx.de>2010-05-22 11:48:45 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-04 16:38:55 -0400
commit20c8a44b7cd5e56b62898a87f620b3a7269eb898 (patch)
treee1c23699bb1d2d9036ae199cee09044aa2a95df5 /drivers/staging
parent5f411a90ee163801434775264b4f9932f1de9e4c (diff)
Staging: 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 an error situation. So we must use unregister_netdev. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/batman-adv/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c
index 9d13979c2d8e..50a66b42d476 100644
--- a/drivers/staging/batman-adv/main.c
+++ b/drivers/staging/batman-adv/main.c
@@ -127,7 +127,7 @@ int init_module(void)
127 return 0; 127 return 0;
128 128
129unreg_soft_device: 129unreg_soft_device:
130 unregister_netdevice(soft_device); 130 unregister_netdev(soft_device);
131free_soft_device: 131free_soft_device:
132 free_netdev(soft_device); 132 free_netdev(soft_device);
133 soft_device = NULL; 133 soft_device = NULL;