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

Commit ad8cd1c4 authored by Vikash Garodia's avatar Vikash Garodia
Browse files

msm: vidc: delete v4l2 controls after queue release



vb queue release calls stop streaming. In stop streaming, video
driver may need to access the v4l2 controls. Deleting the v4l2
controls before releasing the vb queue may lead to NULL access.

Change-Id: I7b64fda2fab0cbd5030ca8e88363076238b218ea
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent 3152012b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1810,6 +1810,9 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)

	core = inst->core;

	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);
@@ -1820,9 +1823,6 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)
	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);

	DEINIT_MSM_VIDC_LIST(&inst->scratchbufs);
	DEINIT_MSM_VIDC_LIST(&inst->persistbufs);
	DEINIT_MSM_VIDC_LIST(&inst->pending_getpropq);