media: imx: imx7-media-csi: Zero format struct before calling .get_fmt()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 26 Jan 2023 01:10:01 +0000 (02:10 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 08:07:06 +0000 (09:07 +0100)
commitd01a1c30777e46bad5e87d60bf149f647064dec5
tree941f2d353a5794d1fffca91ce174b187272ee558
parent2c117550d70578b0b9eb183807b0984c11ecb44b
media: imx: imx7-media-csi: Zero format struct before calling .get_fmt()

The v4l2_subdev_format structure passed to the .get_fmt() subdev
operation in imx7_csi_video_validate_fmt() isn't zeroed, which can cause
undefined behaviour. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon-kit
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx7-media-csi.c