]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: ge: common: vpd: Fix read_i2c_vpd return value
authorFrancois Berder <fberder@outlook.fr>
Sat, 31 Jan 2026 11:29:01 +0000 (12:29 +0100)
committerFabio Estevam <festevam@gmail.com>
Fri, 6 Feb 2026 23:30:18 +0000 (20:30 -0300)
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>
board/ge/common/vpd_reader.c

index c28d2c03cfeb7377503646cfdb29724a823ec568..2422db38013942e55fc216473b4d3ddd5be2e4f7 100644 (file)
@@ -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);