diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-15 11:44:36 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-10-15 11:44:36 +0000 |
commit | ccc2e3fe760a425f831b9e1f0e143d7d01d73a25 (patch) | |
tree | ccb4bbe1c3221f1438d12a04cdc203617d18d5ee /src/target/arm920t.c | |
parent | af41e6aac8d2aadf2bcfc84a77ac0f9ded8e7830 (diff) | |
download | riscv-openocd-ccc2e3fe760a425f831b9e1f0e143d7d01d73a25.zip riscv-openocd-ccc2e3fe760a425f831b9e1f0e143d7d01d73a25.tar.gz riscv-openocd-ccc2e3fe760a425f831b9e1f0e143d7d01d73a25.tar.bz2 |
Laurentiu Cocanu - memory read/write and exit() error path fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1064 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/arm920t.c')
-rw-r--r-- | src/target/arm920t.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/target/arm920t.c b/src/target/arm920t.c index b45d0f6..5f499d6 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -233,6 +233,7 @@ int arm920t_write_cp15_physical(target_t *target, int reg_addr, u32 value) int arm920t_execute_cp15(target_t *target, u32 cp15_opcode, u32 arm_opcode) { + int retval; armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; arm_jtag_t *jtag_info = &arm7_9->jtag_info; @@ -294,10 +295,10 @@ int arm920t_execute_cp15(target_t *target, u32 cp15_opcode, u32 arm_opcode) arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, 0, NULL, 1); arm7_9_execute_sys_speed(target); - if (jtag_execute_queue() != ERROR_OK) + if ((retval = jtag_execute_queue()) != ERROR_OK) { LOG_ERROR("failed executing JTAG queue, exiting"); - exit(-1); + return retval; } return ERROR_OK; |