diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-09-12 05:25:44 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-09-12 05:25:44 -0700 |
| commit | e21786a4b9d091a6eb834cd6701acc2ed3e1a85b (patch) | |
| tree | b95cefcd2f96268f14729b9161a31e5bb145f022 | |
| parent | 468e3f4e6efa7011c190fe61f50bc858a19f6b71 (diff) | |
| parent | 0b925d013ebae4d69b79ed3f76ef916868fa895d (diff) | |
Merge "msm: vidc: Avoid adding failed instance into list"
| -rw-r--r-- | drivers/media/platform/msm/vidc/msm_vidc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vidc.c b/drivers/media/platform/msm/vidc/msm_vidc.c index 3677bb6e32e6..2eaae18bc2e9 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc.c +++ b/drivers/media/platform/msm/vidc/msm_vidc.c @@ -1425,10 +1425,6 @@ void *msm_vidc_open(int core_id, int session_type) setup_event_queue(inst, &core->vdev[session_type].vdev); - mutex_lock(&core->lock); - list_add_tail(&inst->list, &core->instances); - mutex_unlock(&core->lock); - rc = msm_comm_try_state(inst, MSM_VIDC_CORE_INIT_DONE); if (rc) { dprintk(VIDC_ERR, @@ -1442,15 +1438,15 @@ void *msm_vidc_open(int core_id, int session_type) goto fail_init; } + mutex_lock(&core->lock); + list_add_tail(&inst->list, &core->instances); + mutex_unlock(&core->lock); + inst->debugfs_root = msm_vidc_debugfs_init_inst(inst, core->debugfs_root); return inst; fail_init: - mutex_lock(&core->lock); - list_del(&inst->list); - mutex_unlock(&core->lock); - v4l2_fh_del(&inst->event_handler); v4l2_fh_exit(&inst->event_handler); vb2_queue_release(&inst->bufq[OUTPUT_PORT].vb2_bufq); |
