diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-05-22 17:48:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-04 13:38:56 -0700 |
commit | 3d9b2358930a3e5225b28ac1458236f3d667e368 (patch) | |
tree | da48e69df6088bc59aa792fbfbfee8b392cd1139 /drivers/staging/batman-adv | |
parent | 20c8a44b7cd5e56b62898a87f620b3a7269eb898 (diff) |
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 <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 | 3 |
1 files changed, 3 insertions, 0 deletions
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; |