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

Commit 10a8e492 authored by Suresh Vankadara's avatar Suresh Vankadara
Browse files

msm: camera: reqmgr: Fix mutex unlock issue



In case of errors, releasing mutex of a link
without acquire the mutex leads to device crash.
Fix mutex locking issues.

Change-Id: I61fba878016528d7761d5e90e8bf2301a3187a25
Signed-off-by: default avatarSuresh Vankadara <svankada@codeaurora.org>
parent 2152c7bc
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1450,8 +1450,7 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)

	if (!add_req) {
		CAM_ERR(CAM_CRM, "sof_data is NULL");
		rc = -EINVAL;
		goto end;
		return -EINVAL;
	}

	CAM_DBG(CAM_CRM, "E: dev %x dev req %lld",
@@ -1461,8 +1460,7 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)

	if (!link) {
		CAM_DBG(CAM_CRM, "link ptr NULL %x", add_req->link_hdl);
		rc = -EINVAL;
		goto end;
		return -EINVAL;
	}

	mutex_lock(&link->lock);