diff options
| author | Francois Berder <[email protected]> | 2026-01-31 12:29:01 +0100 |
|---|---|---|
| committer | Fabio Estevam <[email protected]> | 2026-02-06 20:30:18 -0300 |
| commit | 944e577827478e0ec65bfe1593404df4b9cb1cf4 (patch) | |
| tree | fecd2e12af1b9312c26edf772935c4589e2196eb | |
| parent | 98d6f42fc594bfd5da1dc405aad6cb33cb7341ee (diff) | |
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 <[email protected]>
| -rw-r--r-- | board/ge/common/vpd_reader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/ge/common/vpd_reader.c b/board/ge/common/vpd_reader.c index c28d2c03cfe..2422db38013 100644 --- a/board/ge/common/vpd_reader.c +++ b/board/ge/common/vpd_reader.c @@ -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); |
