mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 09:42:22 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user