diff options
author | Hugues Fruchet <hugues.fruchet@st.com> | 2017-08-22 10:41:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-26 13:53:34 -0400 |
commit | 134e15e6815921cb6db4fa6a0453df3441989fad (patch) | |
tree | 550771a1cc06ec345977e3f07f7f1188671e3b17 /drivers/media | |
parent | ad3cdf3e1f37299fc1422f7828243635249a3dde (diff) | |
download | linux-134e15e6815921cb6db4fa6a0453df3441989fad.tar.gz linux-134e15e6815921cb6db4fa6a0453df3441989fad.tar.bz2 linux-134e15e6815921cb6db4fa6a0453df3441989fad.zip |
media: stm32-dcmi: catch dma submission error
Test cookie return by dmaengine_submit() and return error if any.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/stm32/stm32-dcmi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index c2168b5c7810..7ffb2d3e99be 100644 --- a/drivers/media/platform/stm32/stm32-dcmi.c +++ b/drivers/media/platform/stm32/stm32-dcmi.c @@ -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); |