From: Tomas Vanek Date: Sun, 5 Aug 2018 14:39:31 +0000 (+0200) Subject: flash/at91sam4: fix clang static analyzer warning X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6ec5fe8269fc1b28531c734071f8dd5abf984b46;p=openocd flash/at91sam4: fix clang static analyzer warning Change-Id: I5e5319d855c868adfa012f68086f7f809ec5a069 Signed-off-by: Tomas Vanek Reviewed-on: http://openocd.zylin.com/4639 Tested-by: jenkins --- diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c index 577360a6..2eec15e2 100644 --- a/src/flash/nor/at91sam4.c +++ b/src/flash/nor/at91sam4.c @@ -3131,7 +3131,8 @@ showall: } if ((who >= 0) && (((unsigned)(who)) < pChip->details.n_gpnvms)) { r = FLASHD_GetGPNVM(&(pChip->details.bank[0]), who, &v); - command_print(CMD_CTX, "sam4-gpnvm%u: %u", who, v); + if (r == ERROR_OK) + command_print(CMD_CTX, "sam4-gpnvm%u: %u", who, v); return r; } else { command_print(CMD_CTX, "sam4-gpnvm invalid GPNVM: %u", who);