Re: [PATCH v2 2/8] media: videobuf2: Make bufs array dynamic allocated

From: Dmitry Osipenko
Date: Fri Mar 24 2023 - 09:02:57 EST


On 3/21/23 13:28, Benjamin Gaignard wrote:
> + q->bufs = kmalloc_array(q->max_num_bufs, sizeof(*q->bufs), GFP_KERNEL | __GFP_ZERO);
> + if (!q->bufs)
> + return -ENOMEM;
> +

Use kcalloc()

--
Best regards,
Dmitry