openocd/src
Antonio Borneo 63e22d5fb9 arm_adi_v5: fix scan-build warning [1/3]
Commit 21f7885d1c ("arm_adi_v5: separate ROM table parsing from
command output [1/3]") introduces a new scan-build warning because
continues the execution even when dap_get_debugbase() returns
error. The value of 'apid' can be uninitialized:

	5th function call argument is an uninitialized value

Check the return value and quit on error.
While there, remove the useless initialization of 'dbgbase' that
was apparently required for the same problem.

Change-Id: Iade26a152925ee0f1bf114ed829b94f7ed5b254f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 21f7885d1c ("arm_adi_v5: separate ROM table parsing from command output [1/3]")
Reviewed-on: https://review.openocd.org/c/openocd/+/7010
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-06-10 21:54:01 +00:00
..
flash flash/nor/numicro: remove useless architecture check 2022-06-10 21:50:39 +00:00
helper openocd: add post-init and pre-shutdown helpers 2022-05-14 08:58:36 +00:00
jtag stlink: manage TCP_BUSY status code when using RW MISC 2022-06-04 08:20:40 +00:00
pld openocd: use single line for register_commands*() 2021-11-23 11:03:38 +00:00
rtos rtos: zephyr: do not use deprecated symbols name 2022-04-23 09:26:32 +00:00
rtt openocd: include config.h in every file .c 2022-03-26 13:32:57 +00:00
server telnet_server: fix valgrind error 2022-06-08 08:46:09 +00:00
svf openocd: fix Yoda conditions with checkpatch 2021-07-24 10:38:31 +01:00
target arm_adi_v5: fix scan-build warning [1/3] 2022-06-10 21:54:01 +00:00
transport openocd: remove NULL comparisons with checkpatch [1/2] 2021-07-24 10:38:00 +01:00
xsvf openocd: fix simple cases of NULL comparison 2021-07-24 10:37:49 +01:00
hello.c openocd: fix simple cases of Yoda condition 2021-07-20 14:55:24 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Cleanup of config/includes. 2021-05-01 14:35:09 +01:00
Makefile.am build: Fix out-of-tree with --disable-dependency-tracking configure flag 2021-04-05 23:24:14 +01:00
openocd.c openocd: add post-init and pre-shutdown helpers 2022-05-14 08:58:36 +00:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00