diff options
Diffstat (limited to 'common/spi_flash_reg.c')
-rw-r--r-- | common/spi_flash_reg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spi_flash_reg.c b/common/spi_flash_reg.c index 3cee0f3bd4..ee8d31fa06 100644 --- a/common/spi_flash_reg.c +++ b/common/spi_flash_reg.c @@ -163,7 +163,7 @@ int spi_flash_protect_to_reg(unsigned int start, unsigned int len, uint8_t *sr1, return EC_ERROR_INVAL; /* Invalid data */ - if ((start && !len) || start + len > CONFIG_FLASH_SIZE) + if ((start && !len) || start + len > CONFIG_FLASH_SIZE_BYTES) return EC_ERROR_INVAL; for (i = 0; i < ARRAY_SIZE(spi_flash_protect_ranges); ++i) { |