diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-05-08 13:47:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 08:20:54 -0400 |
commit | a67e17221429c0322e543ae4bf0b25259c3416a5 (patch) | |
tree | 3c1649a0fcf2614365d755da53f81d549f81af04 /drivers/media/video/videobuf2-core.c | |
parent | 1dd8728e2147820f653e5ea92802002fb26131f1 (diff) |
[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.c | 2 |
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) | |||
1857 | * (multiplane buffers are not supported). | 1857 | * (multiplane buffers are not supported). |
1858 | */ | 1858 | */ |
1859 | if (q->bufs[0]->num_planes != 1) { | 1859 | if (q->bufs[0]->num_planes != 1) { |
1860 | fileio->req.count = 0; | ||
1861 | ret = -EBUSY; | 1860 | ret = -EBUSY; |
1862 | goto err_reqbufs; | 1861 | goto err_reqbufs; |
1863 | } | 1862 | } |
@@ -1904,6 +1903,7 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read) | |||
1904 | return ret; | 1903 | return ret; |
1905 | 1904 | ||
1906 | err_reqbufs: | 1905 | err_reqbufs: |
1906 | fileio->req.count = 0; | ||
1907 | vb2_reqbufs(q, &fileio->req); | 1907 | vb2_reqbufs(q, &fileio->req); |
1908 | 1908 | ||
1909 | err_kfree: | 1909 | err_kfree: |