mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00: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:
parent
96dfa5869d
commit
951dc4e077
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue