diff mbox series

[v4,13/18] staging: media: zoran: fix counting buffer in reserve

Message ID 20211214161636.1886900-14-clabbe@baylibre.com
State Accepted
Commit 4e3edddb9507a28446624144da6be5d1323e6f15
Headers show
Series staging: media: zoran: merge in one module | expand

Commit Message

Corentin Labbe Dec. 14, 2021, 4:16 p.m. UTC
After each capture, zoran driver complains that it remains some unused
buffer. This is due to a missing count handling.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/staging/media/zoran/zoran_driver.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/staging/media/zoran/zoran_driver.c b/drivers/staging/media/zoran/zoran_driver.c
index 31993c266976..32d76876c683 100644
--- a/drivers/staging/media/zoran/zoran_driver.c
+++ b/drivers/staging/media/zoran/zoran_driver.c
@@ -887,6 +887,7 @@  int zr_set_buf(struct zoran *zr)
 		return -EINVAL;
 	}
 	list_del(&buf->queue);
+	zr->buf_in_reserve--;
 	spin_unlock_irqrestore(&zr->queued_bufs_lock, flags);
 
 	vbuf = &buf->vbuf;