summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-04-17 21:12:32 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2024-04-26 12:26:09 +0300
commit5ae6d3f5c85cfc8d3ce60da776387062171cc174 (patch)
tree1a1fd4777ce1b526ee0de4173d2565d82fc64590 /drivers/crypto
parentee2615fa4dc2645d8cc530d23a982ed626f402c2 (diff)
downloadlinux-5ae6d3f5c85cfc8d3ce60da776387062171cc174.tar.xz
crypto: tegra - Fix some error codes
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> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Akhil R <akhilrajeev@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/tegra/tegra-se-aes.c4
1 files 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;
}