Commit 6bc72c5a authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

staging: wilc1000: remove goto from wlan_initialize_threads

This patch remove goto feature from wlan_initialize_threads function.
Goto feature is 'wilc->close=0' & return result.
So, remove goto feature and it was replaced with the return value directly,
as well as removed unused ret variable.
Also, execute 'wilc->close=0' before return.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a40b22c5
...@@ -911,7 +911,6 @@ int wlan_initialize_threads(struct net_device *dev) ...@@ -911,7 +911,6 @@ int wlan_initialize_threads(struct net_device *dev)
{ {
perInterface_wlan_t *nic; perInterface_wlan_t *nic;
struct wilc *wilc; struct wilc *wilc;
int ret = 0;
nic = netdev_priv(dev); nic = netdev_priv(dev);
wilc = nic->wilc; wilc = nic->wilc;
...@@ -922,16 +921,12 @@ int wlan_initialize_threads(struct net_device *dev) ...@@ -922,16 +921,12 @@ int wlan_initialize_threads(struct net_device *dev)
"K_TXQ_TASK"); "K_TXQ_TASK");
if (!wilc->txq_thread) { if (!wilc->txq_thread) {
PRINT_ER("couldn't create TXQ thread\n"); PRINT_ER("couldn't create TXQ thread\n");
ret = -ENOBUFS; wilc->close = 0;
goto _fail_2; return -ENOBUFS;
} }
down(&wilc->txq_thread_started); down(&wilc->txq_thread_started);
return 0; return 0;
_fail_2:
wilc->close = 0;
return ret;
} }
static void wlan_deinitialize_threads(struct net_device *dev) static void wlan_deinitialize_threads(struct net_device *dev)
......
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