summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/batman-adv/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c
index 50a66b4..74c70d5 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;