From 79066c950feaca5139af9d14645128482c5e814c Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 17 Sep 2021 12:02:04 +0200 Subject: [PATCH] bmp_libusb: Remove duplicated libusb_init. Thanks to Red Liu for noticing --- src/platforms/hosted/bmp_libusb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/platforms/hosted/bmp_libusb.c b/src/platforms/hosted/bmp_libusb.c index f7a15fa..9a5e636 100644 --- a/src/platforms/hosted/bmp_libusb.c +++ b/src/platforms/hosted/bmp_libusb.c @@ -126,12 +126,6 @@ int find_debuggers(BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info) libusb_strerror(res)); exit(-1); } - res = libusb_init(&info->libusb_ctx); - if (res) { - DEBUG_WARN( "Fatal: Failed to get USB context: %s\n", - libusb_strerror(res)); - exit(-1); - } if (cl_opts->opt_cable) { if ((!strcmp(cl_opts->opt_cable, "list")) || (!strcmp(cl_opts->opt_cable, "l"))) {