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

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
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;