msm: sensor: Add mutex lock during ois power down operations
Protecting operations performed during ois powerdown from race condition by adding mutex locks. CRs-Fixed: 2081806 Change-Id: I27a735fd69d3e98fdd2ed48456336c560b6f3adc Signed-off-by: VijayaKumar T M <vtmuni@codeaurora.org>
This commit is contained in:
parent
a49bb61510
commit
34972c3909
1 changed files with 2 additions and 0 deletions
|
@ -615,11 +615,13 @@ static long msm_ois_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
pr_err("o_ctrl->i2c_client.i2c_func_tbl NULL\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
mutex_lock(o_ctrl->ois_mutex);
|
||||
rc = msm_ois_power_down(o_ctrl);
|
||||
if (rc < 0) {
|
||||
pr_err("%s:%d OIS Power down failed\n",
|
||||
__func__, __LINE__);
|
||||
}
|
||||
mutex_unlock(o_ctrl->ois_mutex);
|
||||
return msm_ois_close(sd, NULL);
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
|
|
Loading…
Add table
Reference in a new issue