target: arc: fix error handling in command 'arc set-reg-exists'

The command is specified through COMMAND_HANDLER. It should not
return JIM_OK / JIM_ERR.

Change-Id: I56666414d49b0298ecc23ec7ef30c77e1e27afa8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7413
Tested-by: jenkins
Reviewed-by: Evgeniy Didin <didin@synopsys.com>
This commit is contained in:
Antonio Borneo 2022-12-19 17:20:06 +01:00
parent da76ba610b
commit 18bafdce61
1 changed files with 2 additions and 2 deletions

View File

@ -763,7 +763,7 @@ COMMAND_HANDLER(arc_set_reg_exists)
struct target * const target = get_current_target(CMD_CTX);
if (!target) {
command_print(CMD, "Unable to get current target.");
return JIM_ERR;
return ERROR_FAIL;
}
if (!CMD_ARGC) {
@ -783,7 +783,7 @@ COMMAND_HANDLER(arc_set_reg_exists)
r->exist = true;
}
return JIM_OK;
return ERROR_OK;
}
/* arc reg-field ($reg_name) ($reg_field)