From: Jon Hunter <jonathanh@nvidia.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Akhil R <akhilrajeev@nvidia.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Thierry Reding <thierry.reding@gmail.com>,
linux-crypto@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/2] crypto: tegra - Fix some error codes
Date: Wed, 17 Apr 2024 20:40:08 +0100 [thread overview]
Message-ID: <2698d178-a5b5-4f6a-80ae-e1d1d17495c2@nvidia.com> (raw)
In-Reply-To: <ec425896-49eb-4099-9898-ac9509f6ab8f@moroto.mountain>
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
next prev parent reply other threads:[~2024-04-17 19:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-04-18 4:02 ` Akhil R
2024-04-19 11:43 ` Thierry Reding
2024-04-26 9:32 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2698d178-a5b5-4f6a-80ae-e1d1d17495c2@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=akhilrajeev@nvidia.com \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox