target/dsp563xx: Handle return values

This fixes 'dead assignment' bugs identified by the clang static analyzer.

Change-Id: I140ed55f0043e06a533f45f50a36887614585b04
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6323
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink 2021-06-17 15:47:11 +02:00 committed by Antonio Borneo
parent fb34fd60ca
commit 56b72b33cf
1 changed files with 9 additions and 0 deletions

View File

@ -1085,8 +1085,17 @@ static int dsp563xx_poll(struct target *target)
if (!dsp563xx->hardware_breakpoints_cleared) {
err = dsp563xx_once_reg_write(target->tap, 1, DSP563XX_ONCE_OBCR, 0);
if (err != ERROR_OK)
return err;
err = dsp563xx_once_reg_write(target->tap, 1, DSP563XX_ONCE_OMLR0, 0);
if (err != ERROR_OK)
return err;
err = dsp563xx_once_reg_write(target->tap, 1, DSP563XX_ONCE_OMLR1, 0);
if (err != ERROR_OK)
return err;
dsp563xx->hardware_breakpoints_cleared = 1;
}