Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a67e1722 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1dd8728e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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: