mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
Clang complains about the variable 'orig_dfsr' that can be used uninitialized both in cortex_a_read_cpu_memory() and in cortex_a_write_cpu_memory(). The issue is caused by an incorrect error path that used to jump through 'goto out'. The code after the label 'out' is specific to handle the case of an error during memory R/W; it is incorrect to jump there to handle an error during the initialization that precedes the memory R/W. Replace the 'goto out' with 'return retval'. Remove the label 'out' that is now unused. Change-Id: Ib4b140221d1c1b63419de109579bde8b63fc2e8c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7393 Tested-by: jenkins