Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698662 > unrolled thread

[PATCH v1 1/5] [media] stm32-dcmi: catch dma submission error

Started byHugues Fruchet <hugues.fruchet@st.com>
First post2017-07-28 12:10 +0200
Last post2017-07-28 12:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v1 1/5] [media] stm32-dcmi: catch dma submission error Hugues Fruchet <hugues.fruchet@st.com> - 2017-07-28 12:10 +0200

#1698662 — [PATCH v1 1/5] [media] stm32-dcmi: catch dma submission error

FromHugues Fruchet <hugues.fruchet@st.com>
Date2017-07-28 12:10 +0200
Subject[PATCH v1 1/5] [media] stm32-dcmi: catch dma submission error
Message-ID<u8anx-2mH-21@gated-at.bofh.it>
Test cookie return by dmaengine_submit() and return error if any.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
 drivers/media/platform/stm32/stm32-dcmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
index 24ef888..716b3db 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);
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web