summaryrefslogtreecommitdiff
path: root/src/flash/nor/pic32mx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nor/pic32mx.c')
-rw-r--r--src/flash/nor/pic32mx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index 25403424..4ebd2564 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -322,7 +322,7 @@ static int pic32mx_write_block(struct flash_bank *bank, uint8_t *buffer,
return retval;
/* memory buffer */
- while (target_alloc_working_area(target, buffer_size, &source) != ERROR_OK)
+ while (target_alloc_working_area_try(target, buffer_size, &source) != ERROR_OK)
{
buffer_size /= 2;
if (buffer_size <= 256)