flash: fix bug in error propagation of flash write_image

when a write/unlock/erase failed during write_image, then
an error was not propagated back up so e.g. flash write
image from tcl scripts would not throw an exception.

Also flash filling speed was printed even when the
operation failed. Output is now less confusing.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Øyvind Harboe
2010-06-14 12:08:46 +02:00
parent f3ae52cace
commit b6a8254065
3 changed files with 3 additions and 6 deletions

View File

@@ -599,7 +599,6 @@ int flash_write_unlock(struct target *target, struct image *image,
}
/* find the corresponding flash bank */
int retval;
retval = get_flash_bank_by_addr(target, run_address, false, &c);
if (retval != ERROR_OK)
return retval;