diff options
| author | Leo Kim <[email protected]> | 2015-11-05 14:36:33 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-11-15 20:02:47 -0800 |
| commit | 6bc72c5ac7996819961bf65d64693efd3135ea42 (patch) | |
| tree | 87d26cac848683bb46855f9186bdcf28bdf4db61 | |
| parent | a40b22c544ce6bd70f14cf8c5fcb07ef5e64e5d5 (diff) | |
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: Leo Kim <[email protected]>
Signed-off-by: Glen Lee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/wilc1000/linux_wlan.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c529a1572355..3c8155ec657c 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -911,7 +911,6 @@ int wlan_initialize_threads(struct net_device *dev) { perInterface_wlan_t *nic; struct wilc *wilc; - int ret = 0; nic = netdev_priv(dev); wilc = nic->wilc; @@ -922,16 +921,12 @@ int wlan_initialize_threads(struct net_device *dev) "K_TXQ_TASK"); if (!wilc->txq_thread) { PRINT_ER("couldn't create TXQ thread\n"); - ret = -ENOBUFS; - goto _fail_2; + wilc->close = 0; + return -ENOBUFS; } down(&wilc->txq_thread_started); return 0; - -_fail_2: - wilc->close = 0; - return ret; } static void wlan_deinitialize_threads(struct net_device *dev) |