summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ux500
diff options
context:
space:
mode:
authorYueHaibing2018-12-28 07:10:33 +0100
committerHerbert Xu2019-01-11 07:16:56 +0100
commitbe8a54d367bfef7a5b354975f878441383ce9993 (patch)
treed67e6940c3aa34d65487e1a5ba8d13afc016320e /drivers/crypto/ux500
parentcrypto: crypto4xx - add prng crypto support (diff)
downloadkernel-qcow2-linux-be8a54d367bfef7a5b354975f878441383ce9993.tar.gz
kernel-qcow2-linux-be8a54d367bfef7a5b354975f878441383ce9993.tar.xz
kernel-qcow2-linux-be8a54d367bfef7a5b354975f878441383ce9993.zip
crypto: ux500 - catch dma submission error
Test cookie return by dmaengine_submit() and return error if any. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ux500')
-rw-r--r--drivers/crypto/ux500/cryp/cryp_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index a92a66b1ff46..db94f89d8d11 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -595,6 +595,12 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx,
}
cookie = dmaengine_submit(desc);
+ if (dma_submit_error(cookie)) {
+ dev_dbg(ctx->device->dev, "[%s]: DMA submission failed\n",
+ __func__);
+ return cookie;
+ }
+
dma_async_issue_pending(channel);
return 0;