diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-10-12 15:25:00 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2009-10-12 15:25:00 +0200 |
commit | 85398ccdcf251241c56502b3e4897df7e7e48eb5 (patch) | |
tree | 4623c18cb587ef58e60bf219049727cd632d589a | |
parent | 23c629a85eea7b927a179626e8aa377f63734e46 (diff) | |
download | openocd_libswd-85398ccdcf251241c56502b3e4897df7e7e48eb5.tar.gz openocd_libswd-85398ccdcf251241c56502b3e4897df7e7e48eb5.tar.bz2 openocd_libswd-85398ccdcf251241c56502b3e4897df7e7e48eb5.tar.xz openocd_libswd-85398ccdcf251241c56502b3e4897df7e7e48eb5.zip |
More error propagation fixes.
-rw-r--r-- | src/target/arm11.c | 4 | ||||
-rw-r--r-- | src/target/arm11_dbgtap.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c index f7265dac..36ed6b8e 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -1401,7 +1401,9 @@ int arm11_write_memory_inner(struct target_s *target, uint32_t address, uint32_t arm11_common_t * arm11 = target->arch_info; - arm11_run_instr_data_prepare(arm11); + retval = arm11_run_instr_data_prepare(arm11); + if (retval != ERROR_OK) + return retval; /* MRC p14,0,r0,c0,c5,0 */ retval = arm11_run_instr_data_to_core1(arm11, 0xee100e15, address); diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c index 1ab6c524..57685cfd 100644 --- a/src/target/arm11_dbgtap.c +++ b/src/target/arm11_dbgtap.c @@ -925,7 +925,10 @@ void arm11_sc7_set_vcr(arm11_common_t * arm11, uint32_t value) */ int arm11_read_memory_word(arm11_common_t * arm11, uint32_t address, uint32_t * result) { - arm11_run_instr_data_prepare(arm11); + int retval; + retval = arm11_run_instr_data_prepare(arm11); + if (retval != ERROR_OK) + return retval; /* MRC p14,0,r0,c0,c5,0 (r0 = address) */ CHECK_RETVAL(arm11_run_instr_data_to_core1(arm11, 0xee100e15, address)); @@ -933,9 +936,7 @@ int arm11_read_memory_word(arm11_common_t * arm11, uint32_t address, uint32_t * /* LDC p14,c5,[R0],#4 (DTR = [r0]) */ CHECK_RETVAL(arm11_run_instr_data_from_core(arm11, 0xecb05e01, result, 1)); - arm11_run_instr_data_finish(arm11); - - return ERROR_OK; + return arm11_run_instr_data_finish(arm11); } |