diff mbox series

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

Message ID 20241015131122.152046-1-colin.i.king@gmail.com (mailing list archive)
State New
Headers show
Series [next] crypto: tegra: remove redundant error check on ret | expand

Commit Message

Colin Ian King Oct. 15, 2024, 1:11 p.m. UTC
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(-)

Comments

Akhil R Oct. 16, 2024, 12:50 p.m. UTC | #1
> 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);
> --

Agreed. Thanks for pointing.

Acked-by: Akhil R <akhilrajeev@nvidia.com>

Regards,
Akhil
diff mbox series

Patch

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);