mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
[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>
This commit is contained in:
parent
1dd8728e21
commit
a67e172214
1 changed files with 1 additions and 1 deletions
|
@ -1857,7 +1857,6 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
|
||||||
* (multiplane buffers are not supported).
|
* (multiplane buffers are not supported).
|
||||||
*/
|
*/
|
||||||
if (q->bufs[0]->num_planes != 1) {
|
if (q->bufs[0]->num_planes != 1) {
|
||||||
fileio->req.count = 0;
|
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto err_reqbufs;
|
goto err_reqbufs;
|
||||||
}
|
}
|
||||||
|
@ -1904,6 +1903,7 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
err_reqbufs:
|
err_reqbufs:
|
||||||
|
fileio->req.count = 0;
|
||||||
vb2_reqbufs(q, &fileio->req);
|
vb2_reqbufs(q, &fileio->req);
|
||||||
|
|
||||||
err_kfree:
|
err_kfree:
|
||||||
|
|
Loading…
Reference in a new issue