summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf2-core.c
diff options
context:
space:
mode:
authorHans de Goede2012-05-08 19:47:39 +0200
committerMauro Carvalho Chehab2012-05-14 14:20:54 +0200
commita67e17221429c0322e543ae4bf0b25259c3416a5 (patch)
tree3c1649a0fcf2614365d755da53f81d549f81af04 /drivers/media/video/videobuf2-core.c
parent[media] v4l2-framework.txt: document v4l2_dont_use_cmd (diff)
downloadkernel-qcow2-linux-a67e17221429c0322e543ae4bf0b25259c3416a5.tar.gz
kernel-qcow2-linux-a67e17221429c0322e543ae4bf0b25259c3416a5.tar.xz
kernel-qcow2-linux-a67e17221429c0322e543ae4bf0b25259c3416a5.zip
[media] videobuf2: Fix a bug in fileio emulation error handling
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>
Diffstat (limited to 'drivers/media/video/videobuf2-core.c')
-rw-r--r--drivers/media/video/videobuf2-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c
index 3786d88183eb..9d4e9edbd2e7 100644
--- a/drivers/media/video/videobuf2-core.c
+++ b/drivers/media/video/videobuf2-core.c
@@ -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;
}
@@ -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: