cortex a8: add missing error handling for mem_ap_atomic_write_u32()

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Øyvind Harboe 2010-07-18 23:03:05 +02:00
parent 19fc52f008
commit ad02493cf2
1 changed files with 5 additions and 1 deletions

View File

@ -147,7 +147,9 @@ static int cortex_a8_exec_opcode(struct target *target,
} }
} }
mem_ap_write_u32(swjdp, armv7a->debug_base + CPUDBG_ITR, opcode); retval = mem_ap_write_u32(swjdp, armv7a->debug_base + CPUDBG_ITR, opcode);
if (retval != ERROR_OK)
return retval;
do do
{ {
@ -273,6 +275,8 @@ static int cortex_a8_dap_write_coreregister_u32(struct target *target,
LOG_DEBUG("write DCC 0x%08" PRIx32, value); LOG_DEBUG("write DCC 0x%08" PRIx32, value);
retval = mem_ap_write_u32(swjdp, retval = mem_ap_write_u32(swjdp,
armv7a->debug_base + CPUDBG_DTRRX, value); armv7a->debug_base + CPUDBG_DTRRX, value);
if (retval != ERROR_OK)
return retval;
if (Rd < 15) if (Rd < 15)
{ {