summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/main.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2013-07-23 02:17:50 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2013-07-24 15:02:09 (GMT)
commit4cfda67d8f37cc422ad9f181c173a241c913055b (patch)
treea9d360c31bba40157b77e21733e2899af5735aa1 /drivers/net/wireless/mwifiex/main.c
parentf3340e6cfd0100d70653fe8a300049420e464deb (diff)
downloadlinux-4cfda67d8f37cc422ad9f181c173a241c913055b.tar.xz
mwifiex: move if_ops.cleanup_if() call
As if_ops.init_if() is called in mwifiex_register(), corresponding cleanup routine should be called in mwifiex_unregister(). Currently it's there in mwifiex_adapter_cleanup(), hence interface specific cleanup is not performed if driver initialization is failed. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r--drivers/net/wireless/mwifiex/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index ef151c5..f26beb7 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -191,6 +191,9 @@ static int mwifiex_unregister(struct mwifiex_adapter *adapter)
{
s32 i;
+ if (adapter->if_ops.cleanup_if)
+ adapter->if_ops.cleanup_if(adapter);
+
del_timer(&adapter->cmd_timer);
/* Free private structures */