From: Minghao Chi Date: Wed, 12 Jan 2022 08:06:29 +0000 (+0000) Subject: can: softing: softing_netdev_open(): remove redundant ret variable X-Git-Tag: v6.1-rc5~1746^2~263^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51ae468aa7e412315203d13ef387751f0c58c55c;p=platform%2Fkernel%2Flinux-starfive.git can: softing: softing_netdev_open(): remove redundant ret variable Return value from softing_startstop() directly instead of taking this in another redundant variable. Link: https://lore.kernel.org/all/20220112080629.667191-1-chi.minghao@zte.com.cn Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index d74e895..8d27ac6 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c @@ -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)