summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/baytrail/nvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/soc/intel/baytrail/nvm.c b/src/soc/intel/baytrail/nvm.c
index dccc8014dc..843bc5aa8b 100644
--- a/src/soc/intel/baytrail/nvm.c
+++ b/src/soc/intel/baytrail/nvm.c
@@ -54,10 +54,11 @@ static inline uint32_t to_flash_offset(void *p)
int nvm_is_erased(const void *start, size_t size)
{
- const char *cur = start;
+ const uint8_t *cur = start;
+ const uint8_t erased_value = 0xff;
while (size > 0) {
- if (*cur != 0xff)
+ if (*cur != erased_value)
return 0;
cur++;
size--;