Skip to content

Commit

Permalink
Staging: batman-adv: Don't call free_netdev twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent 20c8a44 commit 3d9b235
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/staging/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3d9b235

Please sign in to comment.