Merge "msm: camera: add protection in the cci write function"
This commit is contained in:
commit
01f0e05f48
1 changed files with 6 additions and 0 deletions
|
@ -1602,6 +1602,12 @@ static int32_t msm_cci_write(struct v4l2_subdev *sd,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cci_dev->cci_state != CCI_STATE_ENABLED) {
|
||||||
|
pr_err("%s invalid cci state %d\n",
|
||||||
|
__func__, cci_dev->cci_state);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (c_ctrl->cci_info->cci_i2c_master >= MASTER_MAX
|
if (c_ctrl->cci_info->cci_i2c_master >= MASTER_MAX
|
||||||
|| c_ctrl->cci_info->cci_i2c_master < 0) {
|
|| c_ctrl->cci_info->cci_i2c_master < 0) {
|
||||||
pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__);
|
pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__);
|
||||||
|
|
Loading…
Add table
Reference in a new issue