Skip to content

Commit

Permalink
[media] vb2: Handle return value from start_streaming callback
Browse files Browse the repository at this point in the history
Fix vb2 not handling return value from start_streaming() callback.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Pawel Osciak authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 4ffabdb commit 5db2c3b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/media/video/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@ EXPORT_SYMBOL_GPL(vb2_dqbuf);
int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
{
struct vb2_buffer *vb;
int ret;

if (q->fileio) {
dprintk(1, "streamon: file io in progress\n");
Expand Down Expand Up @@ -1138,12 +1139,16 @@ int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
}
}

q->streaming = 1;

/*
* Let driver notice that streaming state has been enabled.
*/
call_qop(q, start_streaming, q);
ret = call_qop(q, start_streaming, q);
if (ret) {
dprintk(1, "streamon: driver refused to start streaming\n");
return ret;
}

q->streaming = 1;

/*
* If any buffers were queued before streamon,
Expand Down

0 comments on commit 5db2c3b

Please sign in to comment.