flash/nor/jtagspi: propagate error from jtag_execute_queue()

Change-Id: Ib985bdf3d60345a1e701f9cc98f89a47ff74d3e2
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5684
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tomas Vanek 2020-05-17 08:17:25 +02:00 committed by Antonio Borneo
parent ec30634c13
commit 9a5af06f82
1 changed files with 2 additions and 2 deletions

View File

@ -153,12 +153,12 @@ static int jtagspi_cmd(struct flash_bank *bank, uint8_t cmd,
jtagspi_set_ir(bank); jtagspi_set_ir(bank);
/* passing from an IR scan to SHIFT-DR clears BYPASS registers */ /* passing from an IR scan to SHIFT-DR clears BYPASS registers */
jtag_add_dr_scan(info->tap, n, fields, TAP_IDLE); jtag_add_dr_scan(info->tap, n, fields, TAP_IDLE);
jtag_execute_queue(); int retval = jtag_execute_queue();
if (is_read) if (is_read)
flip_u8(data_buf, data, lenb); flip_u8(data_buf, data, lenb);
free(data_buf); free(data_buf);
return ERROR_OK; return retval;
} }
static int jtagspi_probe(struct flash_bank *bank) static int jtagspi_probe(struct flash_bank *bank)