Skip to contentSkip to conversation

drivers/net/can/softing: remove redundant ret variable

PATCH New [email protected] 1 participant 1 message Jan 12, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/net/can/softing: remove redundant ret variable

From: Minghao Chi <[email protected]>

Return value from softing_startstop() directly instead of taking this in another redundant variable.

---
 drivers/net/can/softing/softing_main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/can/softing/softing_main.c +1 -4
index cfc1325aad10..737dac5ea3b1 100644
@@ -392,13 +392,10 @@ static int softing_netdev_open(struct net_device *ndev)
 
 static int softing_netdev_stop(struct net_device *ndev)
 {
-	int ret;
-
 	netif_stop_queue(ndev);
 
 	/* softing cycle does close_candev() */
-	ret = softing_startstop(ndev, 0);
-	return ret;
+	return softing_startstop(ndev, 0);
 }
 
 static int softing_candev_set_mode(struct net_device *ndev, enum can_mode mode)
Signature · 1 line
2.25.1