提交 76743b29 编写于 作者: Y Yassine Oudjana 提交者: Mauro Carvalho Chehab

media: camss: camss-video: Don't zero subdev format again after initialization

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: ecefa105 ("media: Zero-initialize all structures passed to subdev pad operations")
Signed-off-by: NYassine Oudjana <y.oudjana@protonmail.com>
Acked-by: NBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: NAndrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 14b4bd01
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册