diff mbox series

[net-next] net: usbnet: mark expected switch fall-through

Message ID 20180903184845.GA8150@embeddedor.com (mailing list archive)
State New, archived
Headers show
Series [net-next] net: usbnet: mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Sept. 3, 2018, 6:48 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1077614 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/usb/usbnet.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Miller Sept. 4, 2018, 7:20 p.m. UTC | #1
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Mon, 3 Sep 2018 13:48:45 -0500

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 1077614 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 770aa62..73aa333 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1527,6 +1527,7 @@  static void usbnet_bh (struct timer_list *t)
 			continue;
 		case tx_done:
 			kfree(entry->urb->sg);
+			/* fall through */
 		case rx_cleanup:
 			usb_free_urb (entry->urb);
 			dev_kfree_skb (skb);