OSDN Git Service

staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value
authorGeorgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Fri, 23 Sep 2016 19:45:25 +0000 (22:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Sep 2016 10:37:14 +0000 (12:37 +0200)
Remove unneeded code in order to make clear
that the function returns 0(success) in all cases.

Done using returnvar.cocci script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c

index f1cd90e..d13a06b 100644 (file)
@@ -3507,12 +3507,11 @@ int ks_wlan_net_stop(struct net_device *dev)
 {
        struct ks_wlan_private *priv = netdev_priv(dev);
 
-       int ret = 0;
        priv->device_open_status = 0;
        del_timer_sync(&update_phyinfo_timer);
 
        if (netif_running(dev))
                netif_stop_queue(dev);
 
-       return ret;
+       return 0;
 }