mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
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>
This commit is contained in:
parent
91e8bcd7b4
commit
e0c77eb37e
1 changed files with 1 additions and 6 deletions
|
@ -896,7 +896,6 @@ static int otx2_cpt_aead_cbc_aes_sha_setkey(struct crypto_aead *cipher,
|
||||||
struct crypto_authenc_key_param *param;
|
struct crypto_authenc_key_param *param;
|
||||||
int enckeylen = 0, authkeylen = 0;
|
int enckeylen = 0, authkeylen = 0;
|
||||||
struct rtattr *rta = (void *)key;
|
struct rtattr *rta = (void *)key;
|
||||||
int status;
|
|
||||||
|
|
||||||
if (!RTA_OK(rta, keylen))
|
if (!RTA_OK(rta, keylen))
|
||||||
return -EINVAL;
|
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->enc_key_len = enckeylen;
|
||||||
ctx->auth_key_len = authkeylen;
|
ctx->auth_key_len = authkeylen;
|
||||||
|
|
||||||
status = aead_hmac_init(cipher);
|
return aead_hmac_init(cipher);
|
||||||
if (status)
|
|
||||||
return status;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int otx2_cpt_aead_ecb_null_sha_setkey(struct crypto_aead *cipher,
|
static int otx2_cpt_aead_ecb_null_sha_setkey(struct crypto_aead *cipher,
|
||||||
|
|
Loading…
Reference in a new issue