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

Commit afdca891 authored by Soundrapandian Jeyaprakash's avatar Soundrapandian Jeyaprakash
Browse files

msm: camera: sanitize the issues in camera driver



The pointer address is masked  while printing logs and
comparison of unsigned value against 0 is fixed.

Change-Id: I55b6bd40b3bb950d147ff1ce20b8be245f7c1a4d
Signed-off-by: default avatarSoundrapandian Jeyaprakash <jsoundra@codeaurora.org>
parent 18adb952
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ static int32_t cam_eeprom_get_cal_data(struct cam_eeprom_ctrl_t *e_ctrl,
		if (io_cfg->direction == CAM_BUF_OUTPUT) {
			rc = cam_mem_get_cpu_buf(io_cfg->mem_handle[0],
				(uint64_t *)&buf_addr, &buf_size);
			CAM_DBG(CAM_EEPROM, "buf_addr : %p, buf_size : %zu\n",
			CAM_DBG(CAM_EEPROM, "buf_addr : %pK, buf_size : %zu\n",
				(void *)buf_addr, buf_size);

			read_buffer = (uint8_t *)buf_addr;
+1 −4
Original line number Diff line number Diff line
@@ -230,10 +230,7 @@ int cam_flash_apply_setting(struct cam_flash_ctrl *fctrl,
	uint16_t num_iterations;
	struct cam_flash_frame_setting *flash_data = NULL;

	if (req_id < 0) {
		CAM_ERR(CAM_FLASH, "ERROR in request id: %lld", req_id);
		return -EINVAL;
	} else if (req_id == 0) {
	if (req_id == 0) {
		if (fctrl->nrt_info.cmn_attr.cmd_type ==
			CAMERA_SENSOR_FLASH_CMD_TYPE_WIDGET) {
			flash_data = &fctrl->nrt_info;