diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-11-03 21:51:31 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2011-11-04 09:05:15 +0000 |
commit | cb38df20dc2cb9a772424065a7f372a16ceae117 (patch) | |
tree | 957d09b95d90308758a43919683b6ae26a3e3b6f | |
parent | d031b5def877c79cd7a2fd0e7499c72eb6af46d5 (diff) |
avr32_regs: add missing error propagation
Change-Id: Ie8b141dd534d73eccfc045069d5f628bd1eea88e
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/166
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
-rw-r--r-- | src/target/avr32_regs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/target/avr32_regs.c b/src/target/avr32_regs.c index eb283fc3..e3761adc 100644 --- a/src/target/avr32_regs.c +++ b/src/target/avr32_regs.c @@ -97,6 +97,9 @@ int avr32_jtag_write_regs(struct avr32_jtag *jtag_info, uint32_t *regs) int i, retval; retval = avr32_jtag_write_reg(jtag_info, 0, regs[AVR32_REG_SR]); + if (retval != ERROR_OK) + return retval; + /* Restore Status reg */ retval = avr32_jtag_exec(jtag_info, MTSR(0, 0)); if (retval != ERROR_OK) |