]> git.sur5r.net Git - openocd/commitdiff
adi_v5_jtag: add missing error handling
authorØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 21 Jun 2010 07:02:53 +0000 (09:02 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 21 Jun 2010 07:03:31 +0000 (09:03 +0200)
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/target/adi_v5_jtag.c

index b3687084c8bef37987e2d7a73a14dd1c71dc9f2e..44f624f3a50134e00a4603b18e77131fb04bcf32 100644 (file)
@@ -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;