Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 134e15e6 authored by Hugues Fruchet's avatar Hugues Fruchet Committed by Mauro Carvalho Chehab
Browse files

media: stm32-dcmi: catch dma submission error



Test cookie return by dmaengine_submit() and return error if any.

Signed-off-by: default avatarHugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ad3cdf3e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -295,6 +295,10 @@ static int dcmi_start_dma(struct stm32_dcmi *dcmi,

	/* Push current DMA transaction in the pending queue */
	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);