aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/atsamv.c
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2020-10-29 18:15:33 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2020-11-04 17:35:09 +0000
commitcd19f466885d542cfee16d5341369b3c445a696f (patch)
tree193152520c5e2afb30a62def1612916541db4c5c /src/flash/nor/atsamv.c
parent91c4c83f44760f323f3bcab44c89ac59b4ed74c7 (diff)
downloadriscv-openocd-cd19f466885d542cfee16d5341369b3c445a696f.zip
riscv-openocd-cd19f466885d542cfee16d5341369b3c445a696f.tar.gz
riscv-openocd-cd19f466885d542cfee16d5341369b3c445a696f.tar.bz2
flash/nor/atsamv: fix clang static analyzer warning
Warning: line 679, column 4 4th function call argument is an uninitialized value Change-Id: If62d96e1595be945c8e17885bb402e820fb1ec7b Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5903 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Jonathan McDowell <noodles-openocd@earth.li>
Diffstat (limited to 'src/flash/nor/atsamv.c')
-rw-r--r--src/flash/nor/atsamv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/flash/nor/atsamv.c b/src/flash/nor/atsamv.c
index af48398..8f1450b 100644
--- a/src/flash/nor/atsamv.c
+++ b/src/flash/nor/atsamv.c
@@ -676,6 +676,9 @@ showall:
}
if ((who >= 0) && (((unsigned)who) < SAMV_NUM_GPNVM_BITS)) {
r = samv_get_gpnvm(target, who, &v);
+ if (r != ERROR_OK)
+ return r;
+
command_print(CMD, "samv-gpnvm%u: %u", who, v);
return r;
} else {