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>
__archive__
Øyvind Harboe 2011-11-03 21:51:31 +01:00 committed by Spencer Oliver
parent d031b5def8
commit cb38df20dc
1 changed files with 3 additions and 0 deletions

View File

@ -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)