]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
security: keys: annotate implicit fall throughs
authorMathieu Malaterre <malat@debian.org>
Mon, 14 Jan 2019 20:17:24 +0000 (21:17 +0100)
committerJames Morris <james.morris@microsoft.com>
Wed, 23 Jan 2019 03:47:47 +0000 (19:47 -0800)
There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warning:

  security/keys/process_keys.c:380:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  security/keys/process_keys.c:404:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  security/keys/process_keys.c:424:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: James Morris <james.morris@microsoft.com>
security/keys/process_keys.c

index 02c77e928f68d123d88c433b4da03fbe85e24cee..3308d738734c62b89c67e1fa16ecc7b660035183 100644 (file)
@@ -379,6 +379,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
                case -EAGAIN: /* no key */
                        if (ret)
                                break;
+                       /* fall through */
                case -ENOKEY: /* negative key */
                        ret = key_ref;
                        break;
@@ -403,6 +404,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
                case -EAGAIN: /* no key */
                        if (ret)
                                break;
+                       /* fall through */
                case -ENOKEY: /* negative key */
                        ret = key_ref;
                        break;
@@ -423,6 +425,7 @@ key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx)
                case -EAGAIN: /* no key */
                        if (ret)
                                break;
+                       /* fall through */
                case -ENOKEY: /* negative key */
                        ret = key_ref;
                        break;