usb: gadget: goku_udc: mark expected switch fall-throughs
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 24 Oct 2017 03:45:36 +0000 (22:45 -0500)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 24 Oct 2017 09:31:08 +0000 (12:31 +0300)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 145713
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/goku_udc.c

index 8433c22900dcb56be27bd3cc56a16420a479e619..cccad51eb99989b54f2b7d203b18a1a1f6d3e7e0 100644 (file)
@@ -127,11 +127,15 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
        mode = 0;
        max = get_unaligned_le16(&desc->wMaxPacketSize);
        switch (max) {
-       case 64:        mode++;
-       case 32:        mode++;
-       case 16:        mode++;
-       case 8:         mode <<= 3;
-                       break;
+       case 64:
+               mode++; /* fall through */
+       case 32:
+               mode++; /* fall through */
+       case 16:
+               mode++; /* fall through */
+       case 8:
+               mode <<= 3;
+               break;
        default:
                return -EINVAL;
        }