summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/atmel/atmel-isc-base.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-06-30 09:58:23 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-07-30 13:01:03 +0200
commitc592b46907adbeb81243f7eb7a468c36692658b8 (patch)
tree3d0a70b8779e798f5d2fa9a236953121d5318cfe /drivers/media/platform/atmel/atmel-isc-base.c
parent76f22c93b209c811bd489950f17f8839adb31901 (diff)
downloadlinux-c592b46907adbeb81243f7eb7a468c36692658b8.tar.bz2
media: videobuf2-core: dequeue if start_streaming fails
If a vb2_queue sets q->min_buffers_needed then when the number of queued buffers reaches q->min_buffers_needed, vb2_core_qbuf() will call the start_streaming() callback. If start_streaming() returns an error, then that error was just returned by vb2_core_qbuf(), but the buffer was still queued. However, userspace expects that if VIDIOC_QBUF fails, the buffer is returned dequeued. So if start_streaming() fails, then remove the buffer from the queue, thus avoiding this unwanted side-effect. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Fixes: b3379c6201bb ("[media] vb2: only call start_streaming if sufficient buffers are queued") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/atmel/atmel-isc-base.c')
0 files changed, 0 insertions, 0 deletions