diff options
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/misc/cros_ec.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index b9f5c7a37ae..a6e3f62ecb0 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -555,7 +555,7 @@ config SPL_I2C_EEPROM config SYS_I2C_EEPROM_ADDR hex "Chip address of the EEPROM device" depends on ID_EEPROM || I2C_EEPROM || SPL_I2C_EEPROM || CMD_EEPROM || ENV_IS_IN_EEPROM - default 0 + default 0x0 if I2C_EEPROM diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index 621d1752176..9c1e6a5e3e7 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -1100,8 +1100,11 @@ int cros_ec_get_sku_id(struct udevice *dev) ret = ec_command_inptr(dev, EC_CMD_GET_SKU_ID, 0, NULL, 0, (uint8_t **)&r, sizeof(*r)); - if (ret != sizeof(*r)) - return -ret; + if (ret != sizeof(*r)) { + if (ret >= 0) + ret = -EIO; + return ret; + } return r->sku_id; } |
