diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-11-07 06:59:03 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2011-11-07 16:14:47 +0000 |
commit | 17b546a900f2215d26cfdafa6938d814c0ab4ec3 (patch) | |
tree | a9b83ca0b395e88a22c1fda329180e8faf043f40 /src/rtos/eCos.c | |
parent | 6be4646d17bef86185ce9d706588585b0271d682 (diff) | |
download | riscv-openocd-17b546a900f2215d26cfdafa6938d814c0ab4ec3.zip riscv-openocd-17b546a900f2215d26cfdafa6938d814c0ab4ec3.tar.gz riscv-openocd-17b546a900f2215d26cfdafa6938d814c0ab4ec3.tar.bz2 |
ecos: add missing error propagation
Change-Id: Ib34815c9cf654517f22486a7c8001fdb7471338c
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/174
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/rtos/eCos.c')
-rw-r--r-- | src/rtos/eCos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rtos/eCos.c b/src/rtos/eCos.c index f301a35..cd04d9d 100644 --- a/src/rtos/eCos.c +++ b/src/rtos/eCos.c @@ -179,11 +179,15 @@ static int eCos_update_threads( struct rtos* rtos) { thread_list_size++; retval = target_read_buffer( rtos->target, thread_index + param->thread_next_offset, param->pointer_width, (uint8_t *) &thread_index ); + if (retval != ERROR_OK) + return retval; } while( thread_index!=first_thread ); // read the current thread id uint32_t current_thread_addr; retval = target_read_buffer( rtos->target, rtos->symbols[eCos_VAL_current_thread_ptr].address, 4, (uint8_t *)¤t_thread_addr); + if (retval != ERROR_OK) + return retval; rtos->current_thread = 0; retval = target_read_buffer( rtos->target, current_thread_addr + param->thread_uniqueid_offset, 2, (uint8_t *)&rtos->current_thread); if ( retval != ERROR_OK ) |