diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-19 14:03:33 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-19 22:13:49 +0200 |
commit | b62c8d600995638081f9a34c358db58337df7bdb (patch) | |
tree | 78dba7c5f3edd544f1fe2313c5a289b45549dbb4 /src/target/arm_adi_v5.c | |
parent | a7315891eff5ed84dbd88e950321c6ff2a58e867 (diff) |
arm_adi_v5: mem_ap_write error propagation
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/arm_adi_v5.c')
-rw-r--r-- | src/target/arm_adi_v5.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 194865e4..39d8bde9 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -376,13 +376,14 @@ static int mem_ap_write_buf_packed_u16(struct adiv5_dap *dap, if (nbytes < 4) { - if (mem_ap_write_buf_u16(dap, buffer, - nbytes, address) != ERROR_OK) + retval = mem_ap_write_buf_u16(dap, buffer, + nbytes, address); + if (retval != ERROR_OK) { LOG_WARNING("Block write error address " "0x%" PRIx32 ", count 0x%x", address, count); - return ERROR_JTAG_DEVICE_ERROR; + return retval; } address += nbytes >> 1; @@ -485,12 +486,13 @@ static int mem_ap_write_buf_packed_u8(struct adiv5_dap *dap, if (nbytes < 4) { - if (mem_ap_write_buf_u8(dap, buffer, nbytes, address) != ERROR_OK) + retval = mem_ap_write_buf_u8(dap, buffer, nbytes, address); + if (retval != ERROR_OK) { LOG_WARNING("Block write error address " "0x%" PRIx32 ", count 0x%x", address, count); - return ERROR_JTAG_DEVICE_ERROR; + return retval; } address += nbytes; |