summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/stm32x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c
index 63a137c1..6b46afc8 100644
--- a/src/flash/nor/stm32x.c
+++ b/src/flash/nor/stm32x.c
@@ -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;