Commit 371fd7ba authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Marc Kleine-Budde

can: dev: can_restart(): remove unused code

Value assigned to variable err is overwritten at line
562: err = priv->do_set_mode(dev, CAN_MODE_START); before
it can be used.

Also, notice that this code has been there since 2014.

Addresses-Coverity-ID: 1227031
Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 22820017
...@@ -553,10 +553,9 @@ static void can_restart(struct net_device *dev) ...@@ -553,10 +553,9 @@ static void can_restart(struct net_device *dev)
/* send restart message upstream */ /* send restart message upstream */
skb = alloc_can_err_skb(dev, &cf); skb = alloc_can_err_skb(dev, &cf);
if (!skb) { if (!skb)
err = -ENOMEM;
goto restart; goto restart;
}
cf->can_id |= CAN_ERR_RESTARTED; cf->can_id |= CAN_ERR_RESTARTED;
netif_rx(skb); netif_rx(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment