]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
HID: usbhid: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:33:24 +0000 (12:33 -0600)
committerJiri Kosina <jkosina@suse.cz>
Wed, 25 Nov 2020 13:01:55 +0000 (14:01 +0100)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple
of warnings by explicitly adding a couple of break statements instead
of letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c

index 17a29ee0ac6c23346e2502df0130dc9a50d89db1..86257ce6d61982256648ef36fc511f63205cb519 100644 (file)
@@ -438,6 +438,7 @@ static void hid_irq_out(struct urb *urb)
                break;
        case -ESHUTDOWN:        /* unplug */
                unplug = 1;
+               break;
        case -EILSEQ:           /* protocol error or unplug */
        case -EPROTO:           /* protocol error or unplug */
        case -ECONNRESET:       /* unlink */
@@ -489,6 +490,7 @@ static void hid_ctrl(struct urb *urb)
                break;
        case -ESHUTDOWN:        /* unplug */
                unplug = 1;
+               break;
        case -EILSEQ:           /* protocol error or unplug */
        case -EPROTO:           /* protocol error or unplug */
        case -ECONNRESET:       /* unlink */