diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-12-28 06:10:33 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-11 14:16:56 +0800 |
commit | be8a54d367bfef7a5b354975f878441383ce9993 (patch) | |
tree | d67e6940c3aa34d65487e1a5ba8d13afc016320e /drivers/crypto/ux500 | |
parent | d072bfa4885354fff86aa1fb1dbc4f1533c9e0bf (diff) |
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.c | 6 |
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; |