From: Gustavo A. R. Silva Date: Fri, 20 Nov 2020 18:33:24 +0000 (-0600) Subject: HID: usbhid: Fix fall-through warnings for Clang X-Git-Tag: v5.11-rc1~95^2~5^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cae96a5d2bf38401b0e380f9025c375e99ac5a57;p=thirdparty%2Fkernel%2Flinux.git HID: usbhid: Fix fall-through warnings for Clang 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 17a29ee0ac6c2..86257ce6d6198 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -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 */