Skip to content

Commit

Permalink
media: camss: camss-video: Don't zero subdev format again after initi…
Browse files Browse the repository at this point in the history
…alization

In an earlier commit, setting the which field of the subdev format struct
in video_get_subdev_format was moved to a designated initializer that also
zeroes all other fields. However, the memset call that was zeroing the
fields earlier was left in place, causing the which field to be cleared
after being set in the initializer.

Remove the memset call from video_get_subdev_format to avoid clearing the
initialized which field.

Fixes: ecefa10 ("media: Zero-initialize all structures passed to subdev pad operations")
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
  • Loading branch information
Yassine Oudjana authored and Mauro Carvalho Chehab committed May 26, 2023
1 parent 14b4bd0 commit 76743b2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/media/platform/qcom/camss/camss-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ static int video_get_subdev_format(struct camss_video *video,
if (subdev == NULL)
return -EPIPE;

memset(&fmt, 0, sizeof(fmt));
fmt.pad = pad;

ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
Expand Down

0 comments on commit 76743b2

Please sign in to comment.