From 18bafdce615132311fd34f2e1bdf57c193d14097 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Mon, 19 Dec 2022 17:20:06 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.openocd.org/c/openocd/+/7413 Tested-by: jenkins Reviewed-by: Evgeniy Didin --- src/target/arc_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/arc_cmd.c b/src/target/arc_cmd.c index e7c54446e..fb1817de6 100644 --- a/src/target/arc_cmd.c +++ b/src/target/arc_cmd.c @@ -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)