camera: Add missing mutex initialization.
inst_lock of pcam_inst needs to be initialized and destroyed properly. Change-Id: Ie041fc429cdf122c01b93393bb4a6c20a08e4267 Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
2f27c211cb
commit
062e25047a
@@ -897,6 +897,7 @@ static int msm_mctl_dev_open(struct file *f)
|
||||
pcam_inst->sensor_pxlcode = pcam->usr_fmts[0].pxlcode;
|
||||
pcam_inst->my_index = i;
|
||||
pcam_inst->pcam = pcam;
|
||||
mutex_init(&pcam_inst->inst_lock);
|
||||
pcam->mctl_node.dev_inst[i] = pcam_inst;
|
||||
|
||||
D("%s pcam_inst %p my_index = %d\n", __func__,
|
||||
@@ -1006,6 +1007,7 @@ static int msm_mctl_dev_close(struct file *f)
|
||||
pcam->mctl_node.dev_inst[pcam_inst->my_index] = NULL;
|
||||
v4l2_fh_del(&pcam_inst->eventHandle);
|
||||
v4l2_fh_exit(&pcam_inst->eventHandle);
|
||||
mutex_destroy(&pcam_inst->inst_lock);
|
||||
|
||||
kfree(pcam_inst);
|
||||
if (NULL != pmctl) {
|
||||
|
||||
Reference in New Issue
Block a user