summaryrefslogtreecommitdiff
path: root/common/eeprom/eeprom_field.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/eeprom/eeprom_field.c')
-rw-r--r--common/eeprom/eeprom_field.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/eeprom/eeprom_field.c b/common/eeprom/eeprom_field.c
index 3bacb1ae7eb..64b9db18c25 100644
--- a/common/eeprom/eeprom_field.c
+++ b/common/eeprom/eeprom_field.c
@@ -56,8 +56,8 @@ static int __eeprom_field_update_bin(struct eeprom_field *field,
tmp[k] = value[reverse ? i - 1 + k : i + k];
}
- byte = simple_strtoul(tmp, &endptr, 0);
- if (*endptr != '\0' || byte < 0)
+ byte = simple_strtoul(tmp, &endptr, 16);
+ if (*endptr != '\0')
return -1;
field->buf[j] = byte;