From: Øyvind Harboe Date: Thu, 3 Nov 2011 20:51:31 +0000 (+0100) Subject: avr32_regs: add missing error propagation X-Git-Tag: v0.6.0-rc1~467 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cb38df20dc2cb9a772424065a7f372a16ceae117;p=openocd avr32_regs: add missing error propagation Change-Id: Ie8b141dd534d73eccfc045069d5f628bd1eea88e Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/166 Tested-by: jenkins Reviewed-by: Spencer Oliver --- 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)