From 282e89c878fd43ba90f0a9416adce81c5f596af7 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Mon, 3 May 2010 18:11:34 +0200 Subject: flash: less bogus errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed bogus errors when trying to allocate a large a target memory buffer as possible. Signed-off-by: Øyvind Harboe --- src/flash/nor/stm32x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/stm32x.c') diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c index 0fdd148e..7afd9597 100644 --- a/src/flash/nor/stm32x.c +++ b/src/flash/nor/stm32x.c @@ -481,7 +481,7 @@ static int stm32x_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) -- cgit v1.2.3