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

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: NHugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 4b84e750
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册