summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-05-05 02:20:24 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2022-05-13 17:24:48 +0800
commite0c77eb37ec770188c0074a9f646717a434c65c9 (patch)
treec48534d42b487bf9ef1ef5befc1399d3bd316578 /drivers/crypto
parent91e8bcd7b4da182e09ea19a2c73167345fe14c98 (diff)
downloadlinux-stable-e0c77eb37ec770188c0074a9f646717a434c65c9.tar.gz
linux-stable-e0c77eb37ec770188c0074a9f646717a434c65c9.tar.bz2
linux-stable-e0c77eb37ec770188c0074a9f646717a434c65c9.zip
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>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
index f8f8542ce3e4..67530e90bbfe 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
@@ -896,7 +896,6 @@ static int otx2_cpt_aead_cbc_aes_sha_setkey(struct crypto_aead *cipher,
struct crypto_authenc_key_param *param;
int enckeylen = 0, authkeylen = 0;
struct rtattr *rta = (void *)key;
- int status;
if (!RTA_OK(rta, keylen))
return -EINVAL;
@@ -938,11 +937,7 @@ static int otx2_cpt_aead_cbc_aes_sha_setkey(struct crypto_aead *cipher,
ctx->enc_key_len = enckeylen;
ctx->auth_key_len = authkeylen;
- status = aead_hmac_init(cipher);
- if (status)
- return status;
-
- return 0;
+ return aead_hmac_init(cipher);
}
static int otx2_cpt_aead_ecb_null_sha_setkey(struct crypto_aead *cipher,