summaryrefslogtreecommitdiff
path: root/src/flash/nor/str9x.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-05-03 18:11:34 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-05-04 09:11:21 +0200
commit282e89c878fd43ba90f0a9416adce81c5f596af7 (patch)
tree0f1839a7fcd3cb841907969d6f72d26ee7715c1a /src/flash/nor/str9x.c
parent70226c221f5879bb6126ff3f2ec9ae64c68d80d6 (diff)
downloadopenocd+libswd-282e89c878fd43ba90f0a9416adce81c5f596af7.tar.gz
openocd+libswd-282e89c878fd43ba90f0a9416adce81c5f596af7.tar.bz2
openocd+libswd-282e89c878fd43ba90f0a9416adce81c5f596af7.tar.xz
openocd+libswd-282e89c878fd43ba90f0a9416adce81c5f596af7.zip
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>
Diffstat (limited to 'src/flash/nor/str9x.c')
-rw-r--r--src/flash/nor/str9x.c2
1 files changed, 1 insertions, 1 deletions
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)