summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-07-18 23:12:25 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-07-19 08:36:15 +0200
commit221ce7c89b2c8792be4099687ed23f04f4e5018d (patch)
tree350235bb1f6ae4a55b80d3bcebf29c8f139570dd /src/target
parent8249261b88644c4b6809bf01c2285f27c97ff434 (diff)
downloadopenocd+libswd-221ce7c89b2c8792be4099687ed23f04f4e5018d.tar.gz
openocd+libswd-221ce7c89b2c8792be4099687ed23f04f4e5018d.tar.bz2
openocd+libswd-221ce7c89b2c8792be4099687ed23f04f4e5018d.tar.xz
openocd+libswd-221ce7c89b2c8792be4099687ed23f04f4e5018d.zip
cortex a8: mem_ap_read_buf_u32() error handling
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/cortex_a8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index 0f5c7428..a2f3ea06 100644
--- a/src/target/cortex_a8.c
+++ b/src/target/cortex_a8.c
@@ -191,7 +191,9 @@ static int cortex_a8_read_regs_through_mem(struct target *target, uint32_t addre
return retval;
dap_ap_select(swjdp, swjdp_memoryap);
- mem_ap_read_buf_u32(swjdp, (uint8_t *)(&regfile[1]), 4*15, address);
+ retval = mem_ap_read_buf_u32(swjdp, (uint8_t *)(&regfile[1]), 4*15, address);
+ if (retval != ERROR_OK)
+ return retval;
dap_ap_select(swjdp, swjdp_debugap);
return retval;