summaryrefslogtreecommitdiff
path: root/drivers/crypto/ux500
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-12-28 09:10:33 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-01-11 09:16:56 +0300
commitbe8a54d367bfef7a5b354975f878441383ce9993 (patch)
treed67e6940c3aa34d65487e1a5ba8d13afc016320e /drivers/crypto/ux500
parentd072bfa4885354fff86aa1fb1dbc4f1533c9e0bf (diff)
downloadlinux-be8a54d367bfef7a5b354975f878441383ce9993.tar.xz
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;