Skip to contentSkip to conversation

crypto: tegra: remove redundant error check on ret

PATCH In review Colin Ian King 3 participants 3 messages Oct 15, 2024 – Oct 26, 2024

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

PATCH 1/1 crypto: tegra: remove redundant error check on ret

Currently there is an unnecessary error check on ret without a proceeding assignment to ret that needs checking. The check is redundant and can be removed.

---
 drivers/crypto/tegra/tegra-se-aes.c | 2 --
 1 file changed, 2 deletions(-)
drivers/crypto/tegra/tegra-se-aes.c +0 -2
index ae7a0f8435fc..9d130592cc0a 100644
@@ -1180,8 +1180,6 @@ static int tegra_ccm_do_one_req(struct crypto_engine *engine, void *areq)
 			goto out;
 	} else {
 		rctx->cryptlen = req->cryptlen - ctx->authsize;
-		if (ret)
-			goto out;
 
 		/* CTR operation */
 		ret = tegra_ccm_do_ctr(ctx, rctx);
Signature · 1 line
2.39.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines

Currently there is an unnecessary error check on ret without a proceeding assignment to ret that needs checking. The check is redundant and can be removed.

---
 drivers/crypto/tegra/tegra-se-aes.c | 2 --
 1 file changed, 2 deletions(-)
drivers/crypto/tegra/tegra-se- renamed from drivers/crypto/tegra/tegra-se-aes.c +0 -0

aes.c
index ae7a0f8435fc..9d130592cc0a 100644

drivers/crypto/tegra/tegra-se-aes.c +0 -2
@@ -1180,8 +1180,6 @@ static int tegra_ccm_do_one_req(struct crypto_engine
 *engine, void *areq)
                        goto out;
        } else {
                rctx->cryptlen = req->cryptlen - ctx->authsize;
-               if (ret)
-                       goto out;
 
                /* CTR operation */
                ret = tegra_ccm_do_ctr(ctx, rctx);
Quoted 1 line

--

Agreed. Thanks for pointing.

Regards,
Akhil

maintainer
#2 lore raw
In reply to Colin Ian King
Quoted 8 lines · Colin Ian King

Currently there is an unnecessary error check on ret without a proceeding assignment to ret that needs checking. The check is redundant and can be removed.

---
 drivers/crypto/tegra/tegra-se-aes.c | 2 --
 1 file changed, 2 deletions(-)

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