Merge "msm: camera: flash: Validate the power setting size"
This commit is contained in:
commit
906c7de80a
1 changed files with 10 additions and 0 deletions
|
@ -269,6 +269,16 @@ static int32_t msm_flash_i2c_init(
|
||||||
flash_ctrl->power_info.power_down_setting_size =
|
flash_ctrl->power_info.power_down_setting_size =
|
||||||
flash_ctrl->power_setting_array.size_down;
|
flash_ctrl->power_setting_array.size_down;
|
||||||
|
|
||||||
|
if ((flash_ctrl->power_info.power_setting_size > MAX_POWER_CONFIG) ||
|
||||||
|
(flash_ctrl->power_info.power_down_setting_size > MAX_POWER_CONFIG)) {
|
||||||
|
pr_err("%s:%d invalid power setting size=%d size_down=%d\n",
|
||||||
|
__func__, __LINE__,
|
||||||
|
flash_ctrl->power_info.power_setting_size,
|
||||||
|
flash_ctrl->power_info.power_down_setting_size);
|
||||||
|
rc = -EINVAL;
|
||||||
|
goto msm_flash_i2c_init_fail;
|
||||||
|
}
|
||||||
|
|
||||||
rc = msm_camera_power_up(&flash_ctrl->power_info,
|
rc = msm_camera_power_up(&flash_ctrl->power_info,
|
||||||
flash_ctrl->flash_device_type,
|
flash_ctrl->flash_device_type,
|
||||||
&flash_ctrl->flash_i2c_client);
|
&flash_ctrl->flash_i2c_client);
|
||||||
|
|
Loading…
Add table
Reference in a new issue