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

Commit 1ec567be authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: reqmgr: Change state check in callbacks



Currently certain callbacks are processed only if the link
is in ready state. This change allows them to processed if
the link is either in ready or error state.

Change-Id: I7a8294c943a10dea968530cb38bfd153146ae86b
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent 3d32646f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1856,7 +1856,7 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)

	mutex_lock(&link->lock);
	spin_lock_bh(&link->link_state_spin_lock);
	if (link->state != CAM_CRM_LINK_STATE_READY) {
	if (link->state < CAM_CRM_LINK_STATE_READY) {
		CAM_WARN(CAM_CRM, "invalid link state:%d", link->state);
		rc = -EPERM;
		spin_unlock_bh(&link->link_state_spin_lock);
@@ -1993,7 +1993,7 @@ static int cam_req_mgr_cb_notify_trigger(
	}

	spin_lock_bh(&link->link_state_spin_lock);
	if (link->state != CAM_CRM_LINK_STATE_READY) {
	if (link->state < CAM_CRM_LINK_STATE_READY) {
		CAM_WARN(CAM_CRM, "invalid link state:%d", link->state);
		spin_unlock_bh(&link->link_state_spin_lock);
		rc = -EPERM;