stm32: return early upon block write failure

only if we do not have enough ram do we continue.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
__archive__
Øyvind Harboe 2010-11-08 16:53:24 +01:00
parent 6ef3d4ccfe
commit fc4e001de3
1 changed files with 3 additions and 0 deletions

View File

@ -668,6 +668,9 @@ static int stm32x_write(struct flash_bank *bank, uint8_t *buffer,
}
}
if ((retval != ERROR_OK) && (retval != ERROR_TARGET_RESOURCE_NOT_AVAILABLE))
return retval;
while (words_remaining > 0)
{
uint16_t value;