mwifiex: remove redundant goto exit_remove statement
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 3 Dec 2013 07:17:57 +0000 (23:17 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 9 Dec 2013 20:35:31 +0000 (15:35 -0500)
The check for 'priv' pointer is redundant. 'priv' won't
be used later in this routine.

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>
drivers/net/wireless/mwifiex/main.c

index 36c79cff4924a4bd8092266d248d284b103f0065..6bf58aba51d20ca59253efb55ada327888615e5d 100644 (file)
@@ -992,12 +992,8 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
                rtnl_unlock();
        }
 
-       priv = adapter->priv[0];
-       if (!priv || !priv->wdev)
-               goto exit_remove;
-
-       wiphy_unregister(priv->wdev->wiphy);
-       wiphy_free(priv->wdev->wiphy);
+       wiphy_unregister(adapter->wiphy);
+       wiphy_free(adapter->wiphy);
 
        mwifiex_terminate_workqueue(adapter);