summaryrefslogtreecommitdiff
path: root/arch/arm/configs
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2018-06-11 14:35:32 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-04 14:23:54 +0300
commit438ac1fd5e1e132782795ba474b97fffbc79bbd5 (patch)
tree98392d17fb9ba0981e4f6b946f27783c481e0150 /arch/arm/configs
parent90ee26fb2f50e1e57f9d957a1799af1bcafd9671 (diff)
downloadlinux-438ac1fd5e1e132782795ba474b97fffbc79bbd5.tar.xz
media: imx274: initialize format before v4l2 controls
The current probe function calls v4l2_ctrl_handler_setup() before initializing the format info. This triggers call paths such as: imx274_probe -> v4l2_ctrl_handler_setup -> imx274_s_ctrl -> imx274_set_exposure, where priv->mode_index is accessed before being assigned. This is wrong but does not trigger a visible bug because priv is zero-initialized and 0 is the default value for priv->mode_index. But this would become a crash in follow-up commits when mode_index is replaced by a pointer that must always be valid. Fix the bug before it shows up by initializing struct members early. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'arch/arm/configs')
0 files changed, 0 insertions, 0 deletions