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

Commit cce002f1 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 1fded40f 58569675
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1286,16 +1286,17 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)

	core = inst->core;

	v4l2_fh_del(&inst->event_handler);

	for (i = 0; i < MAX_PORT_NUM; i++)
		vb2_queue_release(&inst->bufq[i].vb2_bufq);

	mutex_lock(&core->lock);
	/* inst->list lives in core->instances */
	list_del(&inst->list);
	mutex_unlock(&core->lock);

	v4l2_fh_del(&inst->event_handler);
	v4l2_fh_exit(&inst->event_handler);

	for (i = 0; i < MAX_PORT_NUM; i++)
		vb2_queue_release(&inst->bufq[i].vb2_bufq);

	pr_info(VIDC_DBG_TAG "Closed video instance: %p\n",
			VIDC_MSG_PRIO2STRING(VIDC_INFO), inst);
	kfree(inst);