Skip to contentSkip to conversation

staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value

PATCH In review Georgiana Rodica Chelu 2 participants 2 messages Sep 23, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value

Remove unneeded code in order to make clear that the function returns 0(success) in all cases.

Done using returnvar.cocci script.

---
Changes in v2:
- Give a better reason for the modification

 drivers/staging/ks7010/ks_wlan_net.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ks7010/ks_wlan_net.c +1 -2
index f1cd90e..d13a06b 100644
@@ -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;
 }
Signature · 1 line
2.7.4
Acked-by on v2 1/1
#1 lore raw
Quoted 6 lines · Georgiana Rodica Chelu

Remove unneeded code in order to make clear that the function returns 0(success) in all cases.

Done using returnvar.cocci script.

Quoted 35 lines

---
Changes in v2:
- Give a better reason for the modification

 drivers/staging/ks7010/ks_wlan_net.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/ks7010/ks_wlan_net.c +1 -3
index f1cd90e..d13a06b 100644
@@ -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;
 }
--

2.7.4

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160923194525.GA7252%40fireworks.
For more options, visit https://groups.google.com/d/optout.