HID: input: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:33:29 +0000 (12:33 -0600)
committerJiri Kosina <jkosina@suse.cz>
Wed, 25 Nov 2020 13:04:46 +0000 (14:04 +0100)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a goto statement 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/hid-input.c

index b0db2a2ac15a7a8547930338c793ed90a7f47e09..fb565902a8c3936f552b253f4ce6cf886611ef08 100644 (file)
@@ -746,6 +746,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
                                field->flags |= HID_MAIN_ITEM_RELATIVE;
                                break;
                        }
+                       goto unknown;
 
                default: goto unknown;
                }