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

Commit 4af2e37b authored by Chandan Kumar Jha's avatar Chandan Kumar Jha Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: lrme: Handle release lock when returning from error case



Release mutex before returning error.

Change-Id: I6f13e04db6ee10e88aa38f43cef1be61e725889f
Signed-off-by: default avatarChandan Kumar Jha <cjha@codeaurora.org>
parent c6200090
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -899,7 +899,7 @@ int cam_lrme_hw_stop(void *hw_priv, void *hw_stop_args, uint32_t arg_size)
		lrme_core->state = CAM_LRME_CORE_STATE_INIT;
	} else {
		CAM_ERR(CAM_LRME, "HW in wrong state %d", lrme_core->state);
		return -EINVAL;
		rc = -EINVAL;
	}

unlock:
@@ -951,7 +951,8 @@ int cam_lrme_hw_submit_req(void *hw_priv, void *hw_submit_args,

	if (lrme_core->req_submit != NULL) {
		CAM_ERR(CAM_LRME, "req_submit is not NULL");
		return -EBUSY;
		rc = -EBUSY;
		goto error;
	}

	rc = cam_lrme_hw_util_submit_req(lrme_core, frame_req);