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__
parent
d031b5def8
commit
cb38df20dc
|
@ -97,6 +97,9 @@ int avr32_jtag_write_regs(struct avr32_jtag *jtag_info, uint32_t *regs)
|
||||||
int i, retval;
|
int i, retval;
|
||||||
|
|
||||||
retval = avr32_jtag_write_reg(jtag_info, 0, regs[AVR32_REG_SR]);
|
retval = avr32_jtag_write_reg(jtag_info, 0, regs[AVR32_REG_SR]);
|
||||||
|
if (retval != ERROR_OK)
|
||||||
|
return retval;
|
||||||
|
|
||||||
/* Restore Status reg */
|
/* Restore Status reg */
|
||||||
retval = avr32_jtag_exec(jtag_info, MTSR(0, 0));
|
retval = avr32_jtag_exec(jtag_info, MTSR(0, 0));
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
|
|
Loading…
Reference in New Issue