diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-05-22 17:48:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-04 13:38:55 -0700 |
commit | 20c8a44b7cd5e56b62898a87f620b3a7269eb898 (patch) | |
tree | e1c23699bb1d2d9036ae199cee09044aa2a95df5 /drivers/staging/batman-adv | |
parent | 5f411a90ee163801434775264b4f9932f1de9e4c (diff) | |
download | op-kernel-dev-20c8a44b7cd5e56b62898a87f620b3a7269eb898.zip op-kernel-dev-20c8a44b7cd5e56b62898a87f620b3a7269eb898.tar.gz |
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/batman-adv')
-rw-r--r-- | drivers/staging/batman-adv/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 9d13979..50a66b4 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -127,7 +127,7 @@ int init_module(void) return 0; unreg_soft_device: - unregister_netdevice(soft_device); + unregister_netdev(soft_device); free_soft_device: free_netdev(soft_device); soft_device = NULL; |