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

Commit bbf06382 authored by Shankar Ravi's avatar Shankar Ravi
Browse files

msm: camera: eeprom: Correct EEPROM Read return



EEPROM Read using QUP I2C returns the number of bytes
read from the EEPROM, While CCI/SPI returns zero value.
Return Error only when if the value is less than zero.

Change-Id: I9de2d83ed7cc3a0319f4ed841ae2ba256732cca3
Signed-off-by: default avatarShankar Ravi <rshankar@codeaurora.org>
parent 6da42e65
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -113,7 +113,7 @@ static int cam_eeprom_read_memory(struct cam_eeprom_ctrl_t *e_ctrl,
				emap[j].mem.addr_type,
				emap[j].mem.data_type,
				emap[j].mem.valid_size);
			if (rc) {
			if (rc < 0) {
				CAM_ERR(CAM_EEPROM, "read failed rc %d",
					rc);
				return rc;