dsp563xxx: fix missing error propagation found by clang

Change-Id: I7380ce145b4942e21b174f2a810928a877c32bc7
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/140
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Øyvind Harboe 2011-10-30 18:36:47 +01:00 committed by Spencer Oliver
parent c0e1bfa8b4
commit fc553327c0
1 changed files with 7 additions and 5 deletions

View File

@ -1323,7 +1323,7 @@ static int dsp563xx_run_algorithm(struct target *target,
int timeout_ms, void *arch_info) int timeout_ms, void *arch_info)
{ {
int i; int i;
int retvaltemp,retval = 0; int retval = ERROR_OK;
struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target); struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target);
if (target->state != TARGET_HALTED) if (target->state != TARGET_HALTED)
@ -1376,10 +1376,12 @@ static int dsp563xx_run_algorithm(struct target *target,
for (i = 0; i < num_mem_params; i++) for (i = 0; i < num_mem_params; i++)
{ {
if (mem_params[i].direction != PARAM_OUT) if (mem_params[i].direction != PARAM_OUT)
if ((retvaltemp = target_read_buffer(target, mem_params[i].address, mem_params[i].size, mem_params[i].value)) != ERROR_OK) retval = target_read_buffer(target,
{ mem_params[i].address,
retval = retvaltemp; mem_params[i].size,
} mem_params[i].value);
if (retval != ERROR_OK)
return retval;
} }
for (i = 0; i < num_reg_params; i++) for (i = 0; i < num_reg_params; i++)