Commit 8af592e2 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 46c83656
...@@ -975,9 +975,8 @@ __v4l2_subdev_state_alloc(struct v4l2_subdev *sd, const char *lock_name, ...@@ -975,9 +975,8 @@ __v4l2_subdev_state_alloc(struct v4l2_subdev *sd, const char *lock_name,
state->lock = &state->_lock; state->lock = &state->_lock;
if (sd->entity.num_pads) { if (sd->entity.num_pads) {
state->pads = kvmalloc_array(sd->entity.num_pads, state->pads = kvcalloc(sd->entity.num_pads,
sizeof(*state->pads), sizeof(*state->pads), GFP_KERNEL);
GFP_KERNEL | __GFP_ZERO);
if (!state->pads) { if (!state->pads) {
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment