OSDN Git Service

media: camss: camss-video: Don't zero subdev format again after initialization
authorYassine Oudjana <y.oudjana@protonmail.com>
Wed, 3 May 2023 07:53:40 +0000 (08:53 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 26 May 2023 09:47:30 +0000 (10:47 +0100)
commit76743b29f4802afdf81d7ff1228c11e697850235
tree231a4df69ca0afb31885e1aaa91fa86e3b2f8e3b
parent14b4bd01f8e5d663a41ef8cec5857db874b66e88
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: ecefa105cc44 ("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>
drivers/media/platform/qcom/camss/camss-video.c