aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jtag/drivers/cmsis_dap_usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c
index 4ee4836..9e723b5 100644
--- a/src/jtag/drivers/cmsis_dap_usb.c
+++ b/src/jtag/drivers/cmsis_dap_usb.c
@@ -895,9 +895,7 @@ static int cmsis_dap_init(void)
retval = cmsis_dap_swd_open();
if (retval != ERROR_OK)
return retval;
- }
-
- if (cmsis_dap_handle == NULL) {
+ } else {
/* Connect in JTAG mode */
if (!(cmsis_dap_handle->caps & INFO_CAPS_JTAG)) {
LOG_ERROR("CMSIS-DAP: JTAG not supported");