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/feroceon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/target/feroceon.c') diff --git a/src/target/feroceon.c b/src/target/feroceon.c index 7388307d..4baa20ca 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -523,6 +523,7 @@ int feroceon_examine_debug_reason(target_t *target) int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buffer) { + int retval; armv4_5_common_t *armv4_5 = target->arch_info; arm7_9_common_t *arm7_9 = armv4_5->arch_info; enum armv4_5_state core_state = armv4_5->core_state; @@ -579,7 +580,10 @@ int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buf target_buffer_set_u32(target, dcc_code_buf + i*4, dcc_code[i]); /* write DCC code to working area */ - target->type->write_memory(target, arm7_9->dcc_working_area->address, 4, dcc_size, dcc_code_buf); + if((retval = target->type->write_memory(target, arm7_9->dcc_working_area->address, 4, dcc_size, dcc_code_buf)) != ERROR_OK) + { + return retval; + } } /* backup clobbered processor state */ -- cgit v1.2.3