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>
This commit is contained in:
Marek Behún 2024-05-21 09:13:28 +02:00 committed by Tom Rini
parent 96dfa5869d
commit 951dc4e077

View file

@ -56,7 +56,7 @@ static int __eeprom_field_update_bin(struct eeprom_field *field,
} }
byte = simple_strtoul(tmp, &endptr, 16); byte = simple_strtoul(tmp, &endptr, 16);
if (*endptr != '\0' || byte < 0) if (*endptr != '\0')
return -1; return -1;
field->buf[j] = byte; field->buf[j] = byte;