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

Commit cc53d333 authored by Venkat Chinta's avatar Venkat Chinta Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: crm: Force unreserve link



This change forces unreserve link to be executed
even in the case of failures in unlinking devices
within the session. Improves logging in unlink
sequence.

Change-Id: Ie0736aaaec21d46a2cf2f3b78d09e7db01e93dd9
Signed-off-by: default avatarVenkat Chinta <vchinta@codeaurora.org>
parent e7d56fc8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1283,7 +1283,8 @@ static int __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link)
				rc = dev->ops->link_setup(&link_data);
				if (rc)
					CAM_ERR(CAM_CRM,
						"Unlink failed dev_hdl %d",
						"Unlink failed dev name %s hdl %x",
						dev->dev_info.name,
						dev->dev_hdl);
			}
			dev->dev_hdl = 0;
@@ -2350,8 +2351,8 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link)
	/* Destroy the link handle */
	rc = cam_destroy_device_hdl(link->link_hdl);
	if (rc < 0) {
		CAM_ERR(CAM_CRM, "error while destroying dev handle %d %x",
			rc, link->link_hdl);
		CAM_ERR(CAM_CRM, "error destroying link hdl %x rc %d",
			link->link_hdl, rc);
	}

	mutex_unlock(&link->lock);
@@ -2552,7 +2553,6 @@ int cam_req_mgr_unlink(struct cam_req_mgr_unlink_info *unlink_info)
	rc = __cam_req_mgr_unlink(link);

	/* Free curent link and put back into session's free pool of links */
	if (!rc)
	__cam_req_mgr_unreserve_link(cam_session, link);

done: