mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
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: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
2282001792
commit
371fd7baa8
@ -553,10 +553,9 @@ static void can_restart(struct net_device *dev)
|
||||
|
||||
/* send restart message upstream */
|
||||
skb = alloc_can_err_skb(dev, &cf);
|
||||
if (!skb) {
|
||||
err = -ENOMEM;
|
||||
if (!skb)
|
||||
goto restart;
|
||||
}
|
||||
|
||||
cf->can_id |= CAN_ERR_RESTARTED;
|
||||
|
||||
netif_rx(skb);
|
||||
|
Loading…
Reference in New Issue
Block a user