summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-05-02 09:14:42 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-05-13 11:02:22 +0200
commit8af592e2ecbcd20e55fe01f24933ccdb6ec4a93c (patch)
treef8f544c8ab3398d3acd485fe22e94b8afc749fad /drivers
parent46c836569196f377f87a3657b330cffaf94bd727 (diff)
downloadlinux-8af592e2ecbcd20e55fe01f24933ccdb6ec4a93c.tar.gz
linux-8af592e2ecbcd20e55fe01f24933ccdb6ec4a93c.tar.bz2
linux-8af592e2ecbcd20e55fe01f24933ccdb6ec4a93c.zip
media: v4l2-subdev.c: kvmalloc_array -> kvcalloc
Fixes smatch warning: drivers/media/v4l2-core/v4l2-subdev.c:978 __v4l2_subdev_state_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')
-rw-r--r--drivers/media/v4l2-core/v4l2-subdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 3da200bb23dd..5c27bac772ea 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -975,9 +975,8 @@ __v4l2_subdev_state_alloc(struct v4l2_subdev *sd, const char *lock_name,
state->lock = &state->_lock;
if (sd->entity.num_pads) {
- state->pads = kvmalloc_array(sd->entity.num_pads,
- sizeof(*state->pads),
- GFP_KERNEL | __GFP_ZERO);
+ state->pads = kvcalloc(sd->entity.num_pads,
+ sizeof(*state->pads), GFP_KERNEL);
if (!state->pads) {
ret = -ENOMEM;
goto err;