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>
diff --git a/common/eeprom/eeprom_field.c b/common/eeprom/eeprom_field.c
index 9b83141..26f6041 100644
--- a/common/eeprom/eeprom_field.c
+++ b/common/eeprom/eeprom_field.c
@@ -56,7 +56,7 @@
}
byte = simple_strtoul(tmp, &endptr, 16);
- if (*endptr != '\0' || byte < 0)
+ if (*endptr != '\0')
return -1;
field->buf[j] = byte;