drivers: flash: Fix variable type
erase_page returns a negative value in case of error. We should not use an unsigned type. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
799147f43a
commit
169144afa1
1 changed files with 2 additions and 1 deletions
|
@ -197,7 +197,8 @@ int flash_stm32_block_erase_loop(const struct device *dev,
|
|||
unsigned int offset,
|
||||
unsigned int len)
|
||||
{
|
||||
unsigned int address = offset, rc = 0;
|
||||
unsigned int address = offset
|
||||
int rc = 0;
|
||||
|
||||
for (; address <= offset + len - 1 ; address += FLASH_PAGE_SIZE) {
|
||||
rc = erase_page(dev, address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue