give the user a error msg on open failure.
Change-Id: If4a57bac7f3e1746c2a05c7a96747a38da188041
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/368
Tested-by: jenkins
Reviewed-by: Mathias Küster <kesmtp@freenet.de>
param->pid);
if (jtag_libusb_open(vids, pids, &h->fd) != ERROR_OK) {
- LOG_DEBUG("stlink_open_usb: open failed");
+ LOG_ERROR("stlink_open_usb: open failed");
return ERROR_FAIL;
}
if (!t) {
LOG_ERROR("stlink_transport_init: no current target");
return ERROR_FAIL;
-
}
- stlink_interface_open();
+ int retval = stlink_interface_open();
+ if (retval != ERROR_OK)
+ return retval;
return stlink_interface_init_target(t);
}