Skip to content

Commit e0c77eb

Browse files
Minghao Chiherbertx
authored andcommitted
crypto: octeontx2 - simplify the return expression of otx2_cpt_aead_cbc_aes_sha_setkey()
Simplify the return expression. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 91e8bcd commit e0c77eb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,6 @@ static int otx2_cpt_aead_cbc_aes_sha_setkey(struct crypto_aead *cipher,
896896
struct crypto_authenc_key_param *param;
897897
int enckeylen = 0, authkeylen = 0;
898898
struct rtattr *rta = (void *)key;
899-
int status;
900899

901900
if (!RTA_OK(rta, keylen))
902901
return -EINVAL;
@@ -938,11 +937,7 @@ static int otx2_cpt_aead_cbc_aes_sha_setkey(struct crypto_aead *cipher,
938937
ctx->enc_key_len = enckeylen;
939938
ctx->auth_key_len = authkeylen;
940939

941-
status = aead_hmac_init(cipher);
942-
if (status)
943-
return status;
944-
945-
return 0;
940+
return aead_hmac_init(cipher);
946941
}
947942

948943
static int otx2_cpt_aead_ecb_null_sha_setkey(struct crypto_aead *cipher,

0 commit comments

Comments
 (0)