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

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

Merge "msm: camera: Allow cmd buffer size to be equal to length"

parents 4dd015fe b03c311a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ int cam_virtual_cdm_submit_bl(struct cam_hw_info *cdm_hw,
			(len >= cdm_cmd->cmd[i].offset)) {


			if ((len - cdm_cmd->cmd[i].offset) <=
			if ((len - cdm_cmd->cmd[i].offset) <
				cdm_cmd->cmd[i].len) {
				CAM_ERR(CAM_CDM, "Not enough buffer");
				rc = -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ int cam_packet_util_get_kmd_buffer(struct cam_packet *packet,

	remain_len = len;
	if (((size_t)cmd_desc->offset >= len) ||
		((size_t)cmd_desc->size >= (len - (size_t)cmd_desc->offset))) {
		((size_t)cmd_desc->size > (len - (size_t)cmd_desc->offset))) {
		CAM_ERR(CAM_UTIL, "invalid memory len:%zd and cmd desc size:%d",
			len, cmd_desc->size);
		rc = -EINVAL;