media: i2c: st-mipid02: correct format propagation
authorAlain Volmat <alain.volmat@foss.st.com>
Mon, 13 Nov 2023 14:57:30 +0000 (15:57 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 4 Dec 2023 09:37:47 +0000 (10:37 +0100)
commitb33cb0cbe2893b96ecbfa16254407153f4b55d16
tree1950daa3c2fc3a47b5d898efed57afa6e3c346e5
parentc9e3e84963a79bc50791ad99bcd06920ee2f28c7
media: i2c: st-mipid02: correct format propagation

Use a copy of the struct v4l2_subdev_format when propagating
format from the sink to source pad in order to avoid impacting the
sink format returned to the application.

Thanks to Jacopo Mondi for pointing the issue.

Fixes: 6c01e6f3f27b ("media: st-mipid02: Propagate format from sink to source pad")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/st-mipid02.c