Commit be8a54d3 authored by YueHaibing's avatar YueHaibing Committed by Herbert Xu

crypto: ux500 - catch dma submission error

Test cookie return by dmaengine_submit() and return error if any.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d072bfa4
...@@ -595,6 +595,12 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx, ...@@ -595,6 +595,12 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx,
} }
cookie = dmaengine_submit(desc); 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); dma_async_issue_pending(channel);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment