]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
jtag/core: fix segfault when adapter driver has no reset method
authorTomas Vanek <vanekt@fbl.cz>
Mon, 3 Feb 2025 20:45:07 +0000 (21:45 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 16 Feb 2025 16:31:06 +0000 (16:31 +0000)
commited4e58410446343a485625ee2722144cc23d55a6
tree6f45b145ba95b60f67c58ef849f56f60fca2e7d3
parent71f92c94468f370be80ce60dd76d5d924ddba69a
jtag/core: fix segfault when adapter driver has no reset method

xlnx-pcie-xvc and linuxspidev adapter drivers does not implement
the reset method.
Although it is likely both adapters will implement the method in
the near future, avoid segfault and return an error instead.

Change-Id: If8ddf165dbc563cf6d64b2094968151075778ba7
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Fixes: commit 8850eb8f2c51 ("swd: get rid of jtag queue to assert/deassert srst")
Reviewed-on: https://review.openocd.org/c/openocd/+/8735
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
src/jtag/core.c