Skip to contentSkip to conversation

crypto: ccree - fix missing break in switch statement

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Feb 11, 2019 – Feb 22, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: ccree - fix missing break in switch statement

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")
---
 drivers/crypto/ccree/cc_cipher.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/ccree/cc_cipher.c +1 -0
index 5e3361a363b5..d9c17078517b 100644
@@ -80,6 +80,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;
Signature · 1 line
2.20.1
#1 lore raw

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

Quoted 26 lines · Gustavo A. R. Silva

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")
---
 drivers/crypto/ccree/cc_cipher.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/ccree/cc_cipher.c +1 -0
index 5e3361a363b5..d9c17078517b 100644
@@ -80,6 +80,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;
maintainer
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 6 lines · Gustavo A. R. Silva

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.

Quoted 6 lines
Fixes 63ee04c8b491 ("crypto: ccree - add skcipher support")
---
 drivers/crypto/ccree/cc_cipher.c | 1 +
 1 file changed, 1 insertion(+)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt