media: dvb-core: Do not initialize twice queue num_buffer field
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Thu, 9 Nov 2023 16:34:35 +0000 (17:34 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 23 Nov 2023 11:10:06 +0000 (12:10 +0100)
The above memset already zeroed all the ctx fields, it is useless
to do it here again.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/dvb-core/dvb_vb2.c

index 3a966fdf814c0993fbbcfb5c6aad23dafb10f7be..167ff82a6fede8135c119d6ba2e8b2cfcac4f074 100644 (file)
@@ -167,8 +167,6 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking)
 
        memset(ctx, 0, sizeof(struct dvb_vb2_ctx));
        q->type = DVB_BUF_TYPE_CAPTURE;
-       /**capture type*/
-       q->is_output = 0;
        /**only mmap is supported currently*/
        q->io_modes = VB2_MMAP;
        q->drv_priv = ctx;
@@ -177,7 +175,6 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking)
        q->ops = &dvb_vb2_qops;
        q->mem_ops = &vb2_vmalloc_memops;
        q->buf_ops = &dvb_vb2_buf_ops;
-       q->num_buffers = 0;
        ret = vb2_core_queue_init(q);
        if (ret) {
                ctx->state = DVB_VB2_STATE_NONE;