From b6a82540654f02dbf4caaed1be538044220dd3dc Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Mon, 14 Jun 2010 12:08:46 +0200 Subject: flash: fix bug in error propagation of flash write_image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/flash/nor/core.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/flash/nor/core.c') diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index d2f2754d..84408e6a 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -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; -- cgit v1.2.3-18-g5258