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>
This commit is contained in:
YueHaibing 2018-12-28 06:10:33 +00:00 committed by Herbert Xu
parent d072bfa488
commit be8a54d367

View File

@ -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;