don't return ERROR_OK in error cases
Change-Id: I7e046df85838692c9044fe9c9d67e8b2c821eb0f Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7236 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
parent
0a7e172420
commit
d983114855
|
@ -175,7 +175,7 @@ COMMAND_HANDLER(virtex2_handle_read_stat_command)
|
|||
device = get_pld_device_by_num(dev_id);
|
||||
if (!device) {
|
||||
command_print(CMD, "pld device '#%s' is out of bounds", CMD_ARGV[0]);
|
||||
return ERROR_OK;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
virtex2_read_stat(device, &status);
|
||||
|
@ -197,7 +197,7 @@ PLD_DEVICE_COMMAND_HANDLER(virtex2_pld_device_command)
|
|||
tap = jtag_tap_by_string(CMD_ARGV[1]);
|
||||
if (!tap) {
|
||||
command_print(CMD, "Tap: %s does not exist", CMD_ARGV[1]);
|
||||
return ERROR_OK;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
virtex2_info = malloc(sizeof(struct virtex2_pld_device));
|
||||
|
|
Loading…
Reference in New Issue