All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto: tegra - Fix some error codes
@ 2024-04-17 18:12 Dan Carpenter
  2024-04-17 18:14 ` Dan Carpenter
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dan Carpenter @ 2024-04-17 18:12 UTC (permalink / raw)
  To: Akhil R
  Cc: Herbert Xu, David S. Miller, Thierry Reding, Jonathan Hunter,
	linux-crypto, linux-tegra, linux-kernel, kernel-janitors

Return negative -ENOMEM, instead of positive ENOMEM.

Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/crypto/tegra/tegra-se-aes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/tegra/tegra-se-aes.c b/drivers/crypto/tegra/tegra-se-aes.c
index adc6cdab389e..ae7a0f8435fc 100644
--- a/drivers/crypto/tegra/tegra-se-aes.c
+++ b/drivers/crypto/tegra/tegra-se-aes.c
@@ -1156,7 +1156,7 @@ static int tegra_ccm_do_one_req(struct crypto_engine *engine, void *areq)
 	rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
 					      &rctx->outbuf.addr, GFP_KERNEL);
 	if (!rctx->outbuf.buf) {
-		ret = ENOMEM;
+		ret = -ENOMEM;
 		goto outbuf_err;
 	}
 
@@ -1226,7 +1226,7 @@ static int tegra_gcm_do_one_req(struct crypto_engine *engine, void *areq)
 	rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
 					      &rctx->outbuf.addr, GFP_KERNEL);
 	if (!rctx->outbuf.buf) {
-		ret = ENOMEM;
+		ret = -ENOMEM;
 		goto outbuf_err;
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] crypto: tegra - Fix some error codes
  2024-04-17 18:12 [PATCH 1/2] crypto: tegra - Fix some error codes Dan Carpenter
@ 2024-04-17 18:14 ` Dan Carpenter
  2024-04-17 19:40 ` Jon Hunter
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2024-04-17 18:14 UTC (permalink / raw)
  To: Akhil R
  Cc: Herbert Xu, David S. Miller, Thierry Reding, Jonathan Hunter,
	linux-crypto, linux-tegra, linux-kernel, kernel-janitors

On Wed, Apr 17, 2024 at 09:12:32PM +0300, Dan Carpenter wrote:
> Return negative -ENOMEM, instead of positive ENOMEM.
> 
> Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---

I didn't mean to put 1/2 in the subject...  Sorry about that.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] crypto: tegra - Fix some error codes
  2024-04-17 18:12 [PATCH 1/2] crypto: tegra - Fix some error codes Dan Carpenter
  2024-04-17 18:14 ` Dan Carpenter
@ 2024-04-17 19:40 ` Jon Hunter
  2024-04-18  4:02 ` Akhil R
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jon Hunter @ 2024-04-17 19:40 UTC (permalink / raw)
  To: Dan Carpenter, Akhil R
  Cc: Herbert Xu, David S. Miller, Thierry Reding, linux-crypto,
	linux-tegra, linux-kernel, kernel-janitors


On 17/04/2024 19:12, Dan Carpenter wrote:
> Return negative -ENOMEM, instead of positive ENOMEM.
> 
> Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>   drivers/crypto/tegra/tegra-se-aes.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/tegra/tegra-se-aes.c b/drivers/crypto/tegra/tegra-se-aes.c
> index adc6cdab389e..ae7a0f8435fc 100644
> --- a/drivers/crypto/tegra/tegra-se-aes.c
> +++ b/drivers/crypto/tegra/tegra-se-aes.c
> @@ -1156,7 +1156,7 @@ static int tegra_ccm_do_one_req(struct crypto_engine *engine, void *areq)
>   	rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
>   					      &rctx->outbuf.addr, GFP_KERNEL);
>   	if (!rctx->outbuf.buf) {
> -		ret = ENOMEM;
> +		ret = -ENOMEM;
>   		goto outbuf_err;
>   	}
>   
> @@ -1226,7 +1226,7 @@ static int tegra_gcm_do_one_req(struct crypto_engine *engine, void *areq)
>   	rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
>   					      &rctx->outbuf.addr, GFP_KERNEL);
>   	if (!rctx->outbuf.buf) {
> -		ret = ENOMEM;
> +		ret = -ENOMEM;
>   		goto outbuf_err;
>   	}
>   

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>

Thanks for fixing!

Jon

-- 
nvpublic

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] crypto: tegra - Fix some error codes
  2024-04-17 18:12 [PATCH 1/2] crypto: tegra - Fix some error codes Dan Carpenter
  2024-04-17 18:14 ` Dan Carpenter
  2024-04-17 19:40 ` Jon Hunter
@ 2024-04-18  4:02 ` Akhil R
  2024-04-19 11:43 ` Thierry Reding
  2024-04-26  9:32 ` Herbert Xu
  4 siblings, 0 replies; 6+ messages in thread
From: Akhil R @ 2024-04-18  4:02 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Herbert Xu, David S. Miller, Thierry Reding, Jon Hunter,
	linux-crypto, linux-tegra, linux-kernel, kernel-janitors

> Return negative -ENOMEM, instead of positive ENOMEM.
> 
> Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/crypto/tegra/tegra-se-aes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/tegra/tegra-se-aes.c b/drivers/crypto/tegra/tegra-se-
> aes.c
> index adc6cdab389e..ae7a0f8435fc 100644
> --- a/drivers/crypto/tegra/tegra-se-aes.c
> +++ b/drivers/crypto/tegra/tegra-se-aes.c
> @@ -1156,7 +1156,7 @@ static int tegra_ccm_do_one_req(struct crypto_engine
> *engine, void *areq)
>         rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
>                                               &rctx->outbuf.addr, GFP_KERNEL);
>         if (!rctx->outbuf.buf) {
> -               ret = ENOMEM;
> +               ret = -ENOMEM;
>                 goto outbuf_err;
>         }
> 
> @@ -1226,7 +1226,7 @@ static int tegra_gcm_do_one_req(struct crypto_engine
> *engine, void *areq)
>         rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
>                                               &rctx->outbuf.addr, GFP_KERNEL);
>         if (!rctx->outbuf.buf) {
> -               ret = ENOMEM;
> +               ret = -ENOMEM;
>                 goto outbuf_err;
>         }
> 
Thanks for the fix.

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] crypto: tegra - Fix some error codes
  2024-04-17 18:12 [PATCH 1/2] crypto: tegra - Fix some error codes Dan Carpenter
                   ` (2 preceding siblings ...)
  2024-04-18  4:02 ` Akhil R
@ 2024-04-19 11:43 ` Thierry Reding
  2024-04-26  9:32 ` Herbert Xu
  4 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2024-04-19 11:43 UTC (permalink / raw)
  To: Dan Carpenter, Akhil R
  Cc: Herbert Xu, David S. Miller, Jonathan Hunter, linux-crypto,
	linux-tegra, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

On Wed Apr 17, 2024 at 8:12 PM CEST, Dan Carpenter wrote:
> Return negative -ENOMEM, instead of positive ENOMEM.
>
> Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/crypto/tegra/tegra-se-aes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] crypto: tegra - Fix some error codes
  2024-04-17 18:12 [PATCH 1/2] crypto: tegra - Fix some error codes Dan Carpenter
                   ` (3 preceding siblings ...)
  2024-04-19 11:43 ` Thierry Reding
@ 2024-04-26  9:32 ` Herbert Xu
  4 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2024-04-26  9:32 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Akhil R, David S. Miller, Thierry Reding, Jonathan Hunter,
	linux-crypto, linux-tegra, linux-kernel, kernel-janitors

On Wed, Apr 17, 2024 at 09:12:32PM +0300, Dan Carpenter wrote:
> Return negative -ENOMEM, instead of positive ENOMEM.
> 
> Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/crypto/tegra/tegra-se-aes.c | 4 ++--
>  1 file changed, 2 insertions(+), 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-26  9:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 18:12 [PATCH 1/2] crypto: tegra - Fix some error codes Dan Carpenter
2024-04-17 18:14 ` Dan Carpenter
2024-04-17 19:40 ` Jon Hunter
2024-04-18  4:02 ` Akhil R
2024-04-19 11:43 ` Thierry Reding
2024-04-26  9:32 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.