staging: wilc1000: remove goto from wlan_initialize_threads
authorLeo Kim <leo.kim@atmel.com>
Thu, 5 Nov 2015 05:36:33 +0000 (14:36 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
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 <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index c529a157235513ac3f61af54a8bf18c372ed27fe..3c8155ec657c91d49a1aa521cbed75ec428c9396 100644 (file)
@@ -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)
This page took 0.026922 seconds and 5 git commands to generate.