media: imx7-media-csi: don't store a floating pointer
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 22 Feb 2019 10:17:10 +0000 (05:17 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 17:43:52 +0000 (13:43 -0400)
commit5eaa30aedd7fc4e6a9f077b7ae5b42c9965d5b98
treeb2f6ee01dd0e274a08c685f0915616d619bf4e87
parent1fc79c4bb19ba5068fc42d3a66655c3b175f9934
media: imx7-media-csi: don't store a floating pointer

if imx7_csi_try_fmt() fails, cc variable won't be
initialized and csi->cc[sdformat->pad] would be pointing
to a random location.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/imx/imx7-media-csi.c