adi_v5_jtag: add missing error handling

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
__archive__
Øyvind Harboe 2010-06-21 09:02:53 +02:00
parent 8d1dcb9bcd
commit 7013b960fe
1 changed files with 5 additions and 1 deletions

View 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;