]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: ccree - fix missing break in switch statement
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 11 Feb 2019 18:31:31 +0000 (12:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:39 +0000 (20:09 +0100)
commit b5be853181a8d4a6e20f2073ccd273d6280cad88 upstream.

Add missing break statement in order to prevent the code from falling
through to case S_DIN_to_DES.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: 63ee04c8b491 ("crypto: ccree - add skcipher support")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccree/cc_cipher.c

index 7623b29911af443ed62491acad2916f078e58a01..339e0d4928e70f3fd276ea596ad10f1259c1b86d 100644 (file)
@@ -79,6 +79,7 @@ static int validate_keys_sizes(struct cc_cipher_ctx *ctx_p, u32 size)
                default:
                        break;
                }
+               break;
        case S_DIN_to_DES:
                if (size == DES3_EDE_KEY_SIZE || size == DES_KEY_SIZE)
                        return 0;