lkml.org 
[lkml]   [2023]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/8] media: videobuf2: Make bufs array dynamic allocated
From
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

\
 
 \ /
  Last update: 2023-03-27 01:16    [W:0.190 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site