From ccc2e3fe760a425f831b9e1f0e143d7d01d73a25 Mon Sep 17 00:00:00 2001 From: oharboe Date: Wed, 15 Oct 2008 11:44:36 +0000 Subject: 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 --- src/target/arm920t.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/target/arm920t.c') diff --git a/src/target/arm920t.c b/src/target/arm920t.c index b45d0f61..5f499d64 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; -- cgit v1.2.3