lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2698d178-a5b5-4f6a-80ae-e1d1d17495c2@nvidia.com>
Date: Wed, 17 Apr 2024 20:40:08 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, Akhil R <akhilrajeev@...dia.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
 "David S. Miller" <davem@...emloft.net>,
 Thierry Reding <thierry.reding@...il.com>, linux-crypto@...r.kernel.org,
 linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2] crypto: tegra - Fix some error codes


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@...aro.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@...dia.com>

Thanks for fixing!

Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ