提交 134e15e6 编写于 作者: H Hugues Fruchet 提交者: Mauro Carvalho Chehab

media: stm32-dcmi: catch dma submission error

Test cookie return by dmaengine_submit() and return error if any.
Signed-off-by: NHugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: NHans Verkuil <hansverk@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 ad3cdf3e
...@@ -295,6 +295,10 @@ static int dcmi_start_dma(struct stm32_dcmi *dcmi, ...@@ -295,6 +295,10 @@ static int dcmi_start_dma(struct stm32_dcmi *dcmi,
/* Push current DMA transaction in the pending queue */ /* Push current DMA transaction in the pending queue */
dcmi->dma_cookie = dmaengine_submit(desc); dcmi->dma_cookie = dmaengine_submit(desc);
if (dma_submit_error(dcmi->dma_cookie)) {
dev_err(dcmi->dev, "%s: DMA submission failed\n", __func__);
return -ENXIO;
}
dma_async_issue_pending(dcmi->dma_chan); dma_async_issue_pending(dcmi->dma_chan);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册