Loading drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c +5 −3 Original line number Diff line number Diff line Loading @@ -479,7 +479,8 @@ static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd, 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) { pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); return -EINVAL; } Loading Loading @@ -524,7 +525,8 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, enum cci_i2c_master_t master; enum cci_i2c_queue_t queue = QUEUE_0; cci_dev = v4l2_get_subdevdata(sd); 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) { pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); return -EINVAL; } Loading Loading @@ -661,7 +663,7 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, CDBG("%s ref_count %d\n", __func__, cci_dev->ref_count); master = c_ctrl->cci_info->cci_i2c_master; CDBG("%s:%d master %d\n", __func__, __LINE__, master); if (master < MASTER_MAX) { if (master < MASTER_MAX && master >= 0) { mutex_lock(&cci_dev->cci_master_info[master].mutex); /* Set reset pending flag to TRUE */ cci_dev->cci_master_info[master].reset_pending = TRUE; Loading Loading
drivers/media/platform/msm/camera_v2/sensor/cci/msm_cci.c +5 −3 Original line number Diff line number Diff line Loading @@ -479,7 +479,8 @@ static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd, 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) { pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); return -EINVAL; } Loading Loading @@ -524,7 +525,8 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd, enum cci_i2c_master_t master; enum cci_i2c_queue_t queue = QUEUE_0; cci_dev = v4l2_get_subdevdata(sd); 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) { pr_err("%s:%d Invalid I2C master addr\n", __func__, __LINE__); return -EINVAL; } Loading Loading @@ -661,7 +663,7 @@ static int32_t msm_cci_init(struct v4l2_subdev *sd, CDBG("%s ref_count %d\n", __func__, cci_dev->ref_count); master = c_ctrl->cci_info->cci_i2c_master; CDBG("%s:%d master %d\n", __func__, __LINE__, master); if (master < MASTER_MAX) { if (master < MASTER_MAX && master >= 0) { mutex_lock(&cci_dev->cci_master_info[master].mutex); /* Set reset pending flag to TRUE */ cci_dev->cci_master_info[master].reset_pending = TRUE; Loading