Skip to content

Commit 5ae6d3f

Browse files
Dan Carpenterherbertx
authored andcommitted
crypto: tegra - Fix some error codes
Return negative -ENOMEM, instead of positive ENOMEM. Fixes: 0880bb3 ("crypto: tegra - Add Tegra Security Engine driver") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Jon Hunter <[email protected]> Acked-by: Akhil R <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent ee2615f commit 5ae6d3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/crypto/tegra/tegra-se-aes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ static int tegra_ccm_do_one_req(struct crypto_engine *engine, void *areq)
11561156
rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
11571157
&rctx->outbuf.addr, GFP_KERNEL);
11581158
if (!rctx->outbuf.buf) {
1159-
ret = ENOMEM;
1159+
ret = -ENOMEM;
11601160
goto outbuf_err;
11611161
}
11621162

@@ -1226,7 +1226,7 @@ static int tegra_gcm_do_one_req(struct crypto_engine *engine, void *areq)
12261226
rctx->outbuf.buf = dma_alloc_coherent(ctx->se->dev, SE_AES_BUFLEN,
12271227
&rctx->outbuf.addr, GFP_KERNEL);
12281228
if (!rctx->outbuf.buf) {
1229-
ret = ENOMEM;
1229+
ret = -ENOMEM;
12301230
goto outbuf_err;
12311231
}
12321232

0 commit comments

Comments
 (0)