Skip to content

Commit

Permalink
[media] videobuf2: Fix a bug in fileio emulation error handling
Browse files Browse the repository at this point in the history
Various error paths in fileio_init where not setting the request-count
to 0 when unrequesting the buffers on error to init the fileio emulation.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 1dd8728 commit a67e172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,6 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
* (multiplane buffers are not supported).
*/
if (q->bufs[0]->num_planes != 1) {
fileio->req.count = 0;
ret = -EBUSY;
goto err_reqbufs;
}
Expand Down Expand Up @@ -1904,6 +1903,7 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
return ret;

err_reqbufs:
fileio->req.count = 0;
vb2_reqbufs(q, &fileio->req);

err_kfree:
Expand Down

0 comments on commit a67e172

Please sign in to comment.