*/
if (cfi_info->not_cfi == 0)
{
- int retval;
-
/* enter CFI query mode
* according to JEDEC Standard No. 68.01,
* a single bus sequence with address = 0x55, data = 0x98 should put
return ERROR_OK;
}
-static int cfi_info(struct flash_bank *bank, char *buf, int buf_size)
+static int get_cfi_info(struct flash_bank *bank, char *buf, int buf_size)
{
int printed;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
/* FIXME: access flash at bus_width size */
.erase_check = default_flash_blank_check,
.protect_check = cfi_protect_check,
- .info = cfi_info,
+ .info = get_cfi_info,
};
}
/* find the corresponding flash bank */
- int retval;
retval = get_flash_bank_by_addr(target, run_address, false, &c);
if (retval != ERROR_OK)
return retval;
}
}
- if (duration_measure(&bench) == ERROR_OK)
+ if ((retval == ERROR_OK) && (duration_measure(&bench) == ERROR_OK))
{
command_print(CMD_CTX, "wrote %" PRIu32 " bytes to 0x%8.8" PRIx32
" in %fs (%0.3f KiB/s)", wrote, address,