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/str9x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/str9x.c') diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c index 3d8b84b3..2208fe32 100644 --- a/src/flash/nor/str9x.c +++ b/src/flash/nor/str9x.c @@ -385,7 +385,7 @@ static int str9x_write_block(struct flash_bank *bank, (uint8_t*)str9x_flash_write_code); /* 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