summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-06-21 09:02:53 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-21 09:03:31 +0200
commit7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a (patch)
tree1544a43643d2185ee7bc2fb4ce0ef5a4a990a745 /src/target
parent8d1dcb9bcde55ff29c1967d86c5f8985620df923 (diff)
downloadopenocd+libswd-7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a.tar.gz
openocd+libswd-7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a.tar.bz2
openocd+libswd-7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a.tar.xz
openocd+libswd-7013b960feeb0d4ab3aeae40d5ac17dda6d79a3a.zip
adi_v5_jtag: add missing error handling
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/adi_v5_jtag.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c
index b3687084..44f624f3 100644
--- a/src/target/adi_v5_jtag.c
+++ b/src/target/adi_v5_jtag.c
@@ -259,7 +259,11 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap)
LOG_DEBUG("jtag-dp: CTRL/STAT error, 0x%" PRIx32, ctrlstat);
/* Check power to debug regions */
if ((ctrlstat & 0xf0000000) != 0xf0000000)
- ahbap_debugport_init(dap);
+ {
+ retval = ahbap_debugport_init(dap);
+ if (retval != ERROR_OK)
+ return retval;
+ }
else
{
uint32_t mem_ap_csw, mem_ap_tar;