media: rkisp1: Zero v4l2_subdev_format fields in when validating links
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 23 Aug 2022 15:11:36 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:15:33 +0000 (18:15 +0100)
commit647c12c47ee0f9f9d17d869b48839b1748153a49
treeb590c7708bf03f662661efb848aebb769280a775
parentabbeb8f7271b62292d580604be07e668c3ae289d
media: rkisp1: Zero v4l2_subdev_format fields in when validating links

[ Upstream commit c53e3a049f35978a150526671587fd46b1ae7ca1 ]

The local sd_fmt variable in rkisp1_capture_link_validate() has
uninitialized fields, which causes random failures when calling the
subdev .get_fmt() operation. Fix it by initializing the variable when
declaring it, which zeros all other fields.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c