flash: less bogus errors

Removed bogus errors when trying to allocate a large
a target memory buffer as possible.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Øyvind Harboe
2010-05-03 18:11:34 +02:00
parent 70226c221f
commit 282e89c878
7 changed files with 8 additions and 8 deletions

View File

@@ -846,7 +846,7 @@ static int stellaris_write_block(struct flash_bank *bank,
buffer_size = wcount * 4;
/* 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 <= buf_min)