From cb38df20dc2cb9a772424065a7f372a16ceae117 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Thu, 3 Nov 2011 21:51:31 +0100 Subject: [PATCH] avr32_regs: add missing error propagation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ie8b141dd534d73eccfc045069d5f628bd1eea88e Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/166 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/target/avr32_regs.c | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.39.5