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

Dmitry Osipenko dmitry.osipenko at collabora.com
Fri Mar 24 06:02:39 PDT 2023


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




More information about the Linux-mediatek mailing list