mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
board: ge: common: vpd: Fix read_i2c_vpd return value
If i2c_eeprom_size fails, the error value is stored in variable size and not ret. Also, this commit fixes printing the error value. Signed-off-by: Francois Berder <fberder@outlook.fr>
This commit is contained in:
committed by
Fabio Estevam
parent
98d6f42fc5
commit
944e577827
@@ -215,8 +215,8 @@ int read_i2c_vpd(struct vpd_cache *cache,
|
||||
|
||||
size = i2c_eeprom_size(dev);
|
||||
if (size < 0) {
|
||||
printf("Unable to get size of eeprom: %d\n", ret);
|
||||
return ret;
|
||||
printf("Unable to get size of eeprom: %d\n", size);
|
||||
return size;
|
||||
}
|
||||
|
||||
data = malloc(size);
|
||||
|
||||
Reference in New Issue
Block a user