summaryrefslogtreecommitdiff
path: root/src/flash/ecos.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/ecos.c')
-rw-r--r--src/flash/ecos.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/flash/ecos.c b/src/flash/ecos.c
index 8b64b2d7..b771d694 100644
--- a/src/flash/ecos.c
+++ b/src/flash/ecos.c
@@ -195,10 +195,11 @@ int loadDriver(ecosflash_flash_bank_t *info)
image.base_address_set = 0;
image.start_address_set = 0;
target_t *target=info->target;
+ int retval;
- if (image_open(&image, info->driverPath, NULL) != ERROR_OK)
+ if ((retval=image_open(&image, info->driverPath, NULL)) != ERROR_OK)
{
- return ERROR_FLASH_BANK_INVALID;
+ return retval;
}
info->start_address=image.start_address;