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>
This commit is contained in:
parent
6ef3d4ccfe
commit
fc4e001de3
|
@ -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)
|
while (words_remaining > 0)
|
||||||
{
|
{
|
||||||
uint16_t value;
|
uint16_t value;
|
||||||
|
|
Loading…
Reference in New Issue