X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstlink-usb.c;fp=src%2Fstlink-usb.c;h=a81676936772ff8c0f7865f3f89b0cd5c39d7368;hb=3bf3bbef0ba03fa54c531b94daaf0c4029c0af8b;hp=c0b0009f2607a41fa0252be957bb6a37b60e5fdd;hpb=214ecc86229ed46173b6d1f1bcc797dc2d6771d2;p=fw%2Fstlink diff --git a/src/stlink-usb.c b/src/stlink-usb.c index c0b0009..a816769 100644 --- a/src/stlink-usb.c +++ b/src/stlink-usb.c @@ -631,8 +631,8 @@ stlink_t* stlink_open_usb(const int verbose) { r = libusb_detach_kernel_driver(slu->usb_handle, 0); if (r<0) { WLOG("libusb_detach_kernel_driver(() error %s\n", strerror(-r)); + goto on_libusb_error; } - goto on_libusb_error; } if (libusb_get_configuration(slu->usb_handle, &config)) {