Merge "msm: ais: sensor: actuator: fix out of bound read for bivcm region params"

This commit is contained in:
Linux Build Service Account 2019-06-20 05:00:41 -07:00 committed by Gerrit - the friendly Code Review server
commit a216516368

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -768,6 +768,8 @@ static int32_t msm_actuator_bivcm_move_focus(
a_ctrl->curr_step_pos, dest_step_pos, curr_lens_pos);
while (a_ctrl->curr_step_pos != dest_step_pos) {
if (a_ctrl->curr_region_index >= a_ctrl->region_size)
break;
step_boundary =
a_ctrl->region_params[a_ctrl->curr_region_index].
step_bound[dir];