Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e6db36d authored by Evgeniy Borisov's avatar Evgeniy Borisov Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: sensor: Fix for lens parking



Skip lens parking if current lens position
is invalid or actuator_parse_i2c_params is
non-initialized.

Change-Id: I3d1be86bb4f599dd313498433c763a031ae47bcc
Signed-off-by: default avatarEvgeniy Borisov <eborisov@codeaurora.org>
parent 55ca3fcf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -384,7 +384,11 @@ static int32_t msm_actuator_park_lens(struct msm_actuator_ctrl_t *a_ctrl)
	a_ctrl->i2c_tbl_index = 0;
	if ((a_ctrl->curr_step_pos > a_ctrl->total_steps) ||
		(!a_ctrl->park_lens.max_step) ||
		(!a_ctrl->step_position_table)) {
		(!a_ctrl->step_position_table) ||
		(!a_ctrl->i2c_reg_tbl) ||
		(!a_ctrl->valid_position) ||
		(!a_ctrl->func_tbl) ||
		(!a_ctrl->func_tbl->actuator_parse_i2c_params)) {
		pr_err("%s:%d Failed to park lens.\n",
			__func__, __LINE__);
		return 0;