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

can: pcan_usb_core: fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by
moving the "default" to the end of the "switch" statement and explicitly adding
a break statement instead of letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115Reported-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: http://lore.kernel.org/r/aab7cf16bf43cc7c3e9c9930d2dae850c1d07a3c.1605896059.git.gustavoars@kernel.orgSigned-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
[mkl: move default to end]
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent e71d2b95
...@@ -295,15 +295,16 @@ static void peak_usb_write_bulk_callback(struct urb *urb) ...@@ -295,15 +295,16 @@ static void peak_usb_write_bulk_callback(struct urb *urb)
netif_trans_update(netdev); netif_trans_update(netdev);
break; break;
default:
if (net_ratelimit())
netdev_err(netdev, "Tx urb aborted (%d)\n",
urb->status);
case -EPROTO: case -EPROTO:
case -ENOENT: case -ENOENT:
case -ECONNRESET: case -ECONNRESET:
case -ESHUTDOWN: case -ESHUTDOWN:
break;
default:
if (net_ratelimit())
netdev_err(netdev, "Tx urb aborted (%d)\n",
urb->status);
break; break;
} }
......
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