aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorLuca Ceresoli <[email protected]>2018-06-11 07:35:32 -0400
committerMauro Carvalho Chehab <[email protected]>2018-07-04 07:23:54 -0400
commit438ac1fd5e1e132782795ba474b97fffbc79bbd5 (patch)
tree98392d17fb9ba0981e4f6b946f27783c481e0150 /tools/perf/scripts/python/netdev-times.py
parent90ee26fb2f50e1e57f9d957a1799af1bcafd9671 (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 <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions