diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-05-02 09:16:25 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-13 11:02:22 +0200 |
commit | d5a8099c7512d94da2fd8cf99b8451278346cfcc (patch) | |
tree | c0e175c7a6f06cd4366aede3ae8f484de7b23d86 /drivers/media/common | |
parent | media: v4l2-ctls-core.c: kvmalloc_array -> kvcalloc (diff) | |
download | linux-d5a8099c7512d94da2fd8cf99b8451278346cfcc.tar.xz linux-d5a8099c7512d94da2fd8cf99b8451278346cfcc.zip |
media: videobuf2-dma-sg.c: kvmalloc_array -> kvcalloc
Fixes smatch warning:
drivers/media/common/videobuf2/videobuf2-dma-sg.c:129 vb2_dma_sg_alloc() warn: Please consider using kvcalloc instead
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/videobuf2/videobuf2-dma-sg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c index f8a21c560ad2..fa69158a65b1 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c @@ -126,8 +126,7 @@ static void *vb2_dma_sg_alloc(struct vb2_buffer *vb, struct device *dev, * there is no memory consistency guarantee, hence dma-sg ignores DMA * attributes passed from the upper layer. */ - buf->pages = kvmalloc_array(buf->num_pages, sizeof(struct page *), - GFP_KERNEL | __GFP_ZERO); + buf->pages = kvcalloc(buf->num_pages, sizeof(struct page *), GFP_KERNEL); if (!buf->pages) goto fail_pages_array_alloc; |