media: atomisp: Remove unnecessary memset(foo, 0, sizeof(foo)) calls
authorHans de Goede <hdegoede@redhat.com>
Wed, 28 Dec 2022 21:56:03 +0000 (22:56 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 07:03:24 +0000 (08:03 +0100)
The memory for all of struct atomisp_video_pipe is kzalloc()-ed in
atomisp_subdev_init() so there is no need to memset parts of
struct atomisp_video_pipe to 0.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_subdev.c

index c32db4f..eb8f319 100644 (file)
@@ -1054,11 +1054,6 @@ static int atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
        INIT_LIST_HEAD(&pipe->activeq);
        INIT_LIST_HEAD(&pipe->buffers_waiting_for_param);
        INIT_LIST_HEAD(&pipe->per_frame_params);
-       memset(pipe->frame_request_config_id,
-              0, VIDEO_MAX_FRAME * sizeof(unsigned int));
-       memset(pipe->frame_params,
-              0, VIDEO_MAX_FRAME *
-              sizeof(struct atomisp_css_params_with_list *));
 
        return 0;
 }