Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffab4490 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix race condition with v4l2 event handler"

parents 41747adc 9ddc6b20
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1198,6 +1198,8 @@ void *msm_vidc_open(int core_id, int session_type)
		goto fail_bufq_output;
	}

	setup_event_queue(inst, &core->vdev[session_type].vdev);

	mutex_lock(&core->lock);
	list_add_tail(&inst->list, &core->instances);
	mutex_unlock(&core->lock);
@@ -1211,10 +1213,10 @@ void *msm_vidc_open(int core_id, int session_type)
	inst->debugfs_root =
		msm_vidc_debugfs_init_inst(inst, core->debugfs_root);

	setup_event_queue(inst, &core->vdev[session_type].vdev);

	return inst;
fail_init:
	v4l2_fh_del(&inst->event_handler);
	v4l2_fh_exit(&inst->event_handler);
	vb2_queue_release(&inst->bufq[OUTPUT_PORT].vb2_bufq);

	mutex_lock(&core->lock);