summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2014-02-10 20:12:00 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-11 13:56:37 +0400
commit952c9ee2900de152c4999d94da5c4bd846ae52e8 (patch)
treeecd9327b2fa13a28b9c93e790e1625219c86fdf5 /drivers/media/v4l2-core
parent4e5a4d8a8e970bd6b96c1c710cd636770b776697 (diff)
downloadlinux-952c9ee2900de152c4999d94da5c4bd846ae52e8.tar.xz
[media] vb2: fix PREPARE_BUF regression
Fix an incorrect test in vb2_internal_qbuf() where only DEQUEUED buffers are allowed. But PREPARED buffers are also OK. Introduced by commit 4138111a27859dcc56a5592c804dd16bb12a23d1 ("vb2: simplify qbuf/prepare_buf by removing callback"). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index dbc2b8ab8cdb..1dc11eda85e7 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1459,11 +1459,6 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
return ret;
vb = q->bufs[b->index];
- if (vb->state != VB2_BUF_STATE_DEQUEUED) {
- dprintk(1, "%s(): invalid buffer state %d\n", __func__,
- vb->state);
- return -EINVAL;
- }
switch (vb->state) {
case VB2_BUF_STATE_DEQUEUED:
@@ -1477,7 +1472,8 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
dprintk(1, "qbuf: buffer still being prepared\n");
return -EINVAL;
default:
- dprintk(1, "qbuf: buffer already in use\n");
+ dprintk(1, "%s(): invalid buffer state %d\n", __func__,
+ vb->state);
return -EINVAL;
}