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:
parent
d072bfa488
commit
be8a54d367
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue