X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fjtag%2Fdrivers%2Flibusb1_common.c;h=c4478cb9b1ac99b863b91df87b2e9d017699a73c;hb=0910f1a50744c87a87417d71075b274ff61417fa;hp=c40519075a9426858dd7c46a2451c3b779c1431b;hpb=700e7605fe63571f6b912ce994c2f1eb1fd4fe92;p=openocd.git diff --git a/src/jtag/drivers/libusb1_common.c b/src/jtag/drivers/libusb1_common.c index c40519075a..c4478cb9b1 100644 --- a/src/jtag/drivers/libusb1_common.c +++ b/src/jtag/drivers/libusb1_common.c @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -51,8 +51,6 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], if (libusb_init(&jtag_libusb_context) < 0) return -ENODEV; - libusb_set_debug(jtag_libusb_context, 3); - cnt = libusb_get_device_list(jtag_libusb_context, &devs); for (idx = 0; idx < cnt; idx++) { @@ -64,8 +62,11 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], /** Free the device list **/ libusb_free_device_list(devs, 1); - if (errCode < 0) + if (errCode) { + LOG_ERROR("libusb_open() failed with %s", + libusb_error_name(errCode)); return errCode; + } return 0; } return -ENODEV;