target: arm_cti: fix return values in handle_cti_dump()

Since the initial commit f444c57bf2 ("arm_cti: add cti command
group") the helper handle_cti_dump() return JIM error codes.

Fix it by returning standard OpenOCD error codes.

Change-Id: Ia36b82083d213aff90fe22fcfe7fbe26172806a3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8904
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2025-05-10 23:52:30 +02:00
parent 4c1e2105c4
commit 8b47a0736b

View File

@@ -232,13 +232,13 @@ COMMAND_HANDLER(handle_cti_dump)
retval = dap_run(ap->dap); retval = dap_run(ap->dap);
if (retval != ERROR_OK) if (retval != ERROR_OK)
return JIM_ERR; return retval;
for (size_t i = 0; i < ARRAY_SIZE(cti_names); i++) for (size_t i = 0; i < ARRAY_SIZE(cti_names); i++)
command_print(CMD, "%8.8s (0x%04"PRIx32") 0x%08"PRIx32, command_print(CMD, "%8.8s (0x%04"PRIx32") 0x%08"PRIx32,
cti_names[i].label, cti_names[i].offset, values[i]); cti_names[i].label, cti_names[i].offset, values[i]);
return JIM_OK; return ERROR_OK;
} }
COMMAND_HANDLER(handle_cti_enable) COMMAND_HANDLER(handle_cti_enable)