From 221ce7c89b2c8792be4099687ed23f04f4e5018d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sun, 18 Jul 2010 23:12:25 +0200 Subject: [PATCH] cortex a8: mem_ap_read_buf_u32() error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- src/target/cortex_a8.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 0f5c74289..a2f3ea060 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 *)(®file[1]), 4*15, address); + retval = mem_ap_read_buf_u32(swjdp, (uint8_t *)(®file[1]), 4*15, address); + if (retval != ERROR_OK) + return retval; dap_ap_select(swjdp, swjdp_debugap); return retval;