summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMarek BehĂșn <kabel@kernel.org>2024-05-21 09:13:28 +0200
committerTom Rini <trini@konsulko.com>2024-06-07 10:47:59 -0600
commit951dc4e077b2ba5eadaba3beb9b61f131ffa6fdc (patch)
tree3c78bbceea393b3b5a119f33aadb5a2fff012ba6 /common
parent96dfa5869da586eb1c8d84c22164a2bf399968a1 (diff)
downloadu-boot-951dc4e077b2ba5eadaba3beb9b61f131ffa6fdc.tar.gz
u-boot-951dc4e077b2ba5eadaba3beb9b61f131ffa6fdc.tar.bz2
u-boot-951dc4e077b2ba5eadaba3beb9b61f131ffa6fdc.zip
common: eeprom_field: Drop unnecessary comparison
The byte variable is of type unsigned char, it is never less than zero. The error case is handled by *endptr, so drop the comparison altogether. Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Diffstat (limited to 'common')
-rw-r--r--common/eeprom/eeprom_field.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/eeprom/eeprom_field.c b/common/eeprom/eeprom_field.c
index 9b831414a4..26f6041e54 100644
--- a/common/eeprom/eeprom_field.c
+++ b/common/eeprom/eeprom_field.c
@@ -56,7 +56,7 @@ static int __eeprom_field_update_bin(struct eeprom_field *field,
}
byte = simple_strtoul(tmp, &endptr, 16);
- if (*endptr != '\0' || byte < 0)
+ if (*endptr != '\0')
return -1;
field->buf[j] = byte;