diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-09-02 09:30:55 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-09-09 10:18:33 +0200 |
commit | 96d3e6f05f5b7ec1cadb6a26c05093efcf062432 (patch) | |
tree | f04cd174563c3c4f283344e3bee20e33bee466fb /drivers/crypto/nx | |
parent | crypto: ccp - Release dma channels before dmaengine unrgister (diff) | |
download | linux-96d3e6f05f5b7ec1cadb6a26c05093efcf062432.tar.xz linux-96d3e6f05f5b7ec1cadb6a26c05093efcf062432.zip |
crypto: nx - Remove the unneeded result variable
Return the value set_msg_len() directly instead of storing it in another
redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx')
-rw-r--r-- | drivers/crypto/nx/nx-aes-ccm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/nx/nx-aes-ccm.c b/drivers/crypto/nx/nx-aes-ccm.c index 3793885f928d..c843f4c6f684 100644 --- a/drivers/crypto/nx/nx-aes-ccm.c +++ b/drivers/crypto/nx/nx-aes-ccm.c @@ -134,7 +134,6 @@ static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, unsigned int cryptlen, u8 *b0) { unsigned int l, lp, m = authsize; - int rc; memcpy(b0, iv, 16); @@ -148,9 +147,7 @@ static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, if (assoclen) *b0 |= 64; - rc = set_msg_len(b0 + 16 - l, cryptlen, l); - - return rc; + return set_msg_len(b0 + 16 - l, cryptlen, l); } static int generate_pat(u8 *iv, |