diff options
author | Hugues Fruchet <hugues.fruchet@st.com> | 2018-06-11 11:50:24 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-06-28 13:45:40 +0200 |
commit | b53a24fc2849a4d56961ac74a7aaeca9f5953a5a (patch) | |
tree | ef9fc861bdf675de82981bdd5a2faf0064856784 | |
parent | media: stm32-dcmi: code cleanup (diff) | |
download | linux-b53a24fc2849a4d56961ac74a7aaeca9f5953a5a.tar.xz linux-b53a24fc2849a4d56961ac74a7aaeca9f5953a5a.zip |
media: stm32-dcmi: do not fall into error on buffer starvation
Return silently instead of falling into error when running
out of available buffers when restarting capture.
Capture will be restarted when new buffers will be
provided by V4L2 client.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/platform/stm32/stm32-dcmi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index b78583dc972b..fc72a57d8478 100644 --- a/drivers/media/platform/stm32/stm32-dcmi.c +++ b/drivers/media/platform/stm32/stm32-dcmi.c @@ -227,13 +227,10 @@ static int dcmi_restart_capture(struct stm32_dcmi *dcmi) /* Restart a new DMA transfer with next buffer */ if (list_empty(&dcmi->buffers)) { - dev_err(dcmi->dev, "%s: No more buffer queued, cannot capture buffer\n", - __func__); - dcmi->errors_count++; + dev_dbg(dcmi->dev, "Capture restart is deferred to next buffer queueing\n"); dcmi->active = NULL; - spin_unlock_irq(&dcmi->irqlock); - return -EINVAL; + return 0; } dcmi->active = list_entry(dcmi->buffers.next, |