flash/jtagspi: handle error return values where needed

Change-Id: Id46c2799f954fb1d4353f652ba3115796c88936d
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/7422
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
This commit is contained in:
Daniel Anselmi 2022-12-29 20:02:39 +01:00 committed by Antonio Borneo
parent 3c2cc6efb8
commit d4225192df
1 changed files with 2 additions and 2 deletions

View File

@ -329,7 +329,7 @@ COMMAND_HANDLER(jtagspi_handle_cmd)
/* process command */
ptr = &read_buffer[0];
jtagspi_cmd(bank, write_buffer[0], &write_buffer[1], num_write - 1, ptr, -num_read);
retval = jtagspi_cmd(bank, write_buffer[0], &write_buffer[1], num_write - 1, ptr, -num_read);
if (retval != ERROR_OK)
return retval;
@ -518,7 +518,7 @@ static int jtagspi_bulk_erase(struct flash_bank *bank)
if (retval != ERROR_OK)
return retval;
jtagspi_cmd(bank, info->dev.chip_erase_cmd, NULL, 0, NULL, 0);
retval = jtagspi_cmd(bank, info->dev.chip_erase_cmd, NULL, 0, NULL, 0);
if (retval != ERROR_OK)
return retval;