[PATCH][next] crypto: tegra: remove redundant error check on ret

Colin Ian King posted 1 patch 1 month, 1 week ago
drivers/crypto/tegra/tegra-se-aes.c | 2 --
1 file changed, 2 deletions(-)
[PATCH][next] crypto: tegra: remove redundant error check on ret
Posted by Colin Ian King 1 month, 1 week ago
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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/crypto/tegra/tegra-se-aes.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/crypto/tegra/tegra-se-aes.c b/drivers/crypto/tegra/tegra-se-aes.c
index ae7a0f8435fc..9d130592cc0a 100644
--- a/drivers/crypto/tegra/tegra-se-aes.c
+++ b/drivers/crypto/tegra/tegra-se-aes.c
@@ -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);
-- 
2.39.5
Re: [PATCH][next] crypto: tegra: remove redundant error check on ret
Posted by Herbert Xu 1 month ago
On Tue, Oct 15, 2024 at 02:11:22PM +0100, Colin Ian King wrote:
> 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.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/crypto/tegra/tegra-se-aes.c | 2 --
>  1 file changed, 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt