diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c index b4861e9cb..98fd58adb 100644 --- a/src/pld/virtex2.c +++ b/src/pld/virtex2.c @@ -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));