aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/netdev.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/netdev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c
index 7afce6e8c507..a44c2b61be08 100644
--- a/drivers/net/wireless/ath/wil6210/netdev.c
+++ b/drivers/net/wireless/ath/wil6210/netdev.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2012 Qualcomm Atheros, Inc. 2 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
3 * 3 *
4 * Permission to use, copy, modify, and/or distribute this software for any 4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above 5 * purpose with or without fee is hereby granted, provided that the above
@@ -168,11 +168,15 @@ void *wil_if_alloc(struct device *dev, void __iomem *csr)
168void wil_if_free(struct wil6210_priv *wil) 168void wil_if_free(struct wil6210_priv *wil)
169{ 169{
170 struct net_device *ndev = wil_to_ndev(wil); 170 struct net_device *ndev = wil_to_ndev(wil);
171
171 if (!ndev) 172 if (!ndev)
172 return; 173 return;
173 174
174 free_netdev(ndev);
175 wil_priv_deinit(wil); 175 wil_priv_deinit(wil);
176
177 wil_to_ndev(wil) = NULL;
178 free_netdev(ndev);
179
176 wil_wdev_free(wil); 180 wil_wdev_free(wil);
177} 181}
178 182