From: Dan Carpenter <dan.carpenter@linaro.org>
To: 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>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-crypto@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] crypto: tegra - Fix some error codes
Date: Wed, 17 Apr 2024 21:12:32 +0300 [thread overview]
Message-ID: <ec425896-49eb-4099-9898-ac9509f6ab8f@moroto.mountain> (raw)
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
next reply other threads:[~2024-04-17 18:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 18:12 Dan Carpenter [this message]
2024-04-17 18:14 ` [PATCH 1/2] crypto: tegra - Fix some error codes 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
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=ec425896-49eb-4099-9898-ac9509f6ab8f@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=akhilrajeev@nvidia.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jonathanh@nvidia.com \
--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 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.