Commit c2868ade authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: remove redundant goto exit_remove statement

The check for 'priv' pointer is redundant. 'priv' won't
be used later in this routine.
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f7b59853
...@@ -992,12 +992,8 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) ...@@ -992,12 +992,8 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
rtnl_unlock(); rtnl_unlock();
} }
priv = adapter->priv[0]; wiphy_unregister(adapter->wiphy);
if (!priv || !priv->wdev) wiphy_free(adapter->wiphy);
goto exit_remove;
wiphy_unregister(priv->wdev->wiphy);
wiphy_free(priv->wdev->wiphy);
mwifiex_terminate_workqueue(adapter); mwifiex_terminate_workqueue(adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment