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/lpc2900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/lpc2900.c') diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c index 360c14de..5b004951 100644 --- a/src/flash/nor/lpc2900.c +++ b/src/flash/nor/lpc2900.c @@ -1288,7 +1288,7 @@ static int lpc2900_write(struct flash_bank *bank, uint8_t *buffer, reduced size if that fails. */ struct working_area *warea; uint32_t buffer_size = lpc2900_info->max_ram_block - 1 * KiB; - while( (retval = target_alloc_working_area(target, + while( (retval = target_alloc_working_area_try(target, buffer_size + target_code_size, &warea)) != ERROR_OK ) { -- cgit v1.2.3-18-g5258