diff options
| author | 2018-06-11 07:35:32 -0400 | |
|---|---|---|
| committer | 2018-07-04 07:23:54 -0400 | |
| commit | 438ac1fd5e1e132782795ba474b97fffbc79bbd5 (patch) | |
| tree | 98392d17fb9ba0981e4f6b946f27783c481e0150 /tools/perf/scripts/python/bin/export-to-postgresql-record | |
| parent | media: ak7375: Add ak7375 lens voice coil driver (diff) | |
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 'tools/perf/scripts/python/bin/export-to-postgresql-record')
0 files changed, 0 insertions, 0 deletions
