diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-06-21 13:25:06 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-06-21 13:43:23 +0200 |
commit | dcba0709580cd8b0d2869894d2f7e22195b7e3d7 (patch) | |
tree | e259284fd9b0fd4d12076873ebd93c18aa68ccb1 /src | |
parent | 7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a (diff) | |
download | openocd_libswd-dcba0709580cd8b0d2869894d2f7e22195b7e3d7.tar.gz openocd_libswd-dcba0709580cd8b0d2869894d2f7e22195b7e3d7.tar.bz2 openocd_libswd-dcba0709580cd8b0d2869894d2f7e22195b7e3d7.tar.xz openocd_libswd-dcba0709580cd8b0d2869894d2f7e22195b7e3d7.zip |
jtag: do not use jtag_get_error()
normal code should not call jtag_get_error(), but rather check
the return code from jtag_execute_queue().
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/adi_v5_jtag.c | 7 | ||||
-rw-r--r-- | src/xsvf/xsvf.c | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 44f624f3..0a374bea 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -120,7 +120,7 @@ int adi_jtag_dp_scan(struct adiv5_dap *dap, jtag_add_runtest(dap->memaccess_tck, TAP_IDLE); - return jtag_get_error(); + return ERROR_OK; } /** @@ -343,14 +343,11 @@ static int jtag_idcode_q_read(struct adiv5_dap *dap, fields[0].in_value = (void *) data; jtag_add_dr_scan(jtag_info->tap, 1, fields, TAP_IDLE); - retval = jtag_get_error(); - if (retval != ERROR_OK) - return retval; jtag_add_callback(arm_le_to_h_u32, (jtag_callback_data_t) data); - return retval; + return ERROR_OK; } static int jtag_dp_q_read(struct adiv5_dap *dap, unsigned reg, diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index 51d0e7b1..f4d09ff9 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -331,7 +331,7 @@ COMMAND_HANDLER(handle_xsvf_command) else jtag_add_pathmove(pathlen, path); - result = jtag_get_error(); + result = jtag_execute_queue(); if (result != ERROR_OK) { LOG_ERROR("XSVF: pathmove error %d", result); |