media: staging: media: zoran: fix counting buffer in reserve
authorCorentin Labbe <clabbe@baylibre.com>
Tue, 14 Dec 2021 16:16:31 +0000 (17:16 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 23 Jan 2022 20:18:39 +0000 (21:18 +0100)
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/zoran/zoran_driver.c

index 31993c2..32d7687 100644 (file)
@@ -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;