selinux: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:32:26 +0000 (12:32 -0600)
committerPaul Moore <paul@paul-moore.com>
Mon, 23 Nov 2020 23:21:13 +0000 (18:21 -0500)
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break 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: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c

index ca5c5623b46d5afcc58c6f6e2146dbee9945b724..943c2693cec7dcdab26ee33ea86c4d8aa84314cd 100644 (file)
@@ -4036,6 +4036,7 @@ static int selinux_kernel_load_data(enum kernel_load_data_id id, bool contents)
        switch (id) {
        case LOADING_MODULE:
                rc = selinux_kernel_module_from_file(NULL);
+               break;
        default:
                break;
        }