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

Commit 158da72a authored by Junzhe Zou's avatar Junzhe Zou
Browse files

msm: camera: reqmgr: init completion correctly



Init completion after enqueue task may cause completion uses lock
without initialization(spin lock magic issue). Move init completion
before enqueue to prevent it.

Change-Id: Ib882f4c603d04a6762c04e044dbcdee712beea35
Signed-off-by: default avatarJunzhe Zou <jnzhezou@codeaurora.org>
parent 79e36d43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2127,10 +2127,10 @@ int cam_req_mgr_flush_requests(
	flush->link_hdl = flush_info->link_hdl;
	flush->flush_type = flush_info->flush_type;
	task->process_cb = &cam_req_mgr_process_flush_req;
	init_completion(&link->workq_comp);
	rc = cam_req_mgr_workq_enqueue_task(task, link, CRM_TASK_PRIORITY_0);

	/* Blocking call */
	init_completion(&link->workq_comp);
	rc = wait_for_completion_timeout(
		&link->workq_comp,
		msecs_to_jiffies(CAM_REQ_MGR_SCHED_REQ_TIMEOUT));