From: Amitkumar Karwar Date: Tue, 3 Dec 2013 07:17:57 +0000 (-0800) Subject: mwifiex: remove redundant goto exit_remove statement X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c2868adebdb1c3233562e152d99a834f084cc07e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Amitkumar Karwar Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 36c79cff4924..6bf58aba51d2 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c @@ -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);