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

Commit ebf0e411 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ais: Fix num_cmd_buf handling"

parents 1ae5d5f1 82d205aa
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -3595,8 +3595,10 @@ static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr,
			if (rc) {
				CAM_ERR(CAM_ICP, "get cmd buf failed %x",
					hw_mgr->iommu_hdl);
				num_cmd_buf = (num_cmd_buf > 0) ?
					num_cmd_buf-- : 0;
				if (num_cmd_buf > 0)
					num_cmd_buf--;
				else
					num_cmd_buf = 0;
				goto rel_cmd_buf;
			}
			*fw_cmd_buf_iova_addr = addr;
@@ -3619,8 +3621,10 @@ static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr,
				CAM_ERR(CAM_ICP, "get cmd buf failed %x",
					hw_mgr->iommu_hdl);
				*fw_cmd_buf_iova_addr = 0;
				num_cmd_buf = (num_cmd_buf > 0) ?
					num_cmd_buf-- : 0;
				if (num_cmd_buf > 0)
					num_cmd_buf--;
				else
					num_cmd_buf = 0;
				goto rel_cmd_buf;
			}
			if ((len <= cmd_desc[i].offset) ||