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

Commit 82d205aa authored by Arun KS's avatar Arun KS
Browse files

msm: ais: Fix num_cmd_buf handling



This patch fix the warnings of handling  num_cmd_buf in GCC environment.

Change-Id: I60f71de6bded9e751ebcd09ca1550499a19cd2fe
Signed-off-by: default avatarArun KS <arunks@codeaurora.org>
parent b62aaff3
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) ||