diff options
author | Tom Rini <trini@konsulko.com> | 2024-07-01 13:17:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-07-01 15:00:56 -0600 |
commit | 65fbdab27224ee3943a89496b21862db83c34da2 (patch) | |
tree | 775a0a54066c2e9a6bbba201676e3d896b5cb0e2 /common/eeprom/eeprom_field.c | |
parent | 3f772959501c99fbe5aa0b22a36efe3478d1ae1c (diff) | |
parent | b4cbd1a257d4027038b4f997d73bdb0a066db045 (diff) |
Merge branch 'next'
Diffstat (limited to 'common/eeprom/eeprom_field.c')
-rw-r--r-- | common/eeprom/eeprom_field.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/eeprom/eeprom_field.c b/common/eeprom/eeprom_field.c index f56eebe679f..64b9db18c25 100644 --- a/common/eeprom/eeprom_field.c +++ b/common/eeprom/eeprom_field.c @@ -6,7 +6,8 @@ * Igor Grinberg <grinberg@compulab.co.il> */ -#include <common.h> +#include <stdio.h> +#include <vsprintf.h> #include <linux/string.h> #include <eeprom_field.h> @@ -55,8 +56,8 @@ static int __eeprom_field_update_bin(struct eeprom_field *field, tmp[k] = value[reverse ? i - 1 + k : i + k]; } - byte = simple_strtoul(tmp, &endptr, 0); - if (*endptr != '\0' || byte < 0) + byte = simple_strtoul(tmp, &endptr, 16); + if (*endptr != '\0') return -1; field->buf[j] = byte; |