src/flash/nor/at91sam3|4l|7: fix clang static analyzer warnings

Change-Id: I5cd2b2ebb2bd1980bdd1632b5c35bda9718a1089
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5365
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
Tomas Vanek
2019-12-20 23:18:37 +01:00
parent 122c80087c
commit b852429500
3 changed files with 4 additions and 7 deletions

View File

@@ -3653,7 +3653,8 @@ showall:
}
if ((who >= 0) && (((unsigned)(who)) < pChip->details.n_gpnvms)) {
r = FLASHD_GetGPNVM(&(pChip->details.bank[0]), who, &v);
command_print(CMD, "sam3-gpnvm%u: %u", who, v);
if (r == ERROR_OK)
command_print(CMD, "sam3-gpnvm%u: %u", who, v);
return r;
} else {
command_print(CMD, "sam3-gpnvm invalid GPNVM: %u", who);