|
|
@@ -166,11 +166,17 @@ bool hashbusterusb_lowl_probe(const struct lowlevel_device_info * const info)
|
|
|
applogr(false, LOG_ERR, "%s: Failed to open %s: %s",
|
|
|
__func__, info->devid, bfg_strerror(j, BST_LIBUSB));
|
|
|
if ( (j = libusb_set_configuration(h, 1)) )
|
|
|
+ {
|
|
|
+ libusb_close(h);
|
|
|
applogr(false, LOG_ERR, "%s: Failed to set configuration 1 on %s: %s",
|
|
|
__func__, info->devid, bfg_strerror(j, BST_LIBUSB));
|
|
|
+ }
|
|
|
if ( (j = libusb_claim_interface(h, 0)) )
|
|
|
+ {
|
|
|
+ libusb_close(h);
|
|
|
applogr(false, LOG_ERR, "%s: Failed to claim interface 0 on %s: %s",
|
|
|
__func__, info->devid, bfg_strerror(j, BST_LIBUSB));
|
|
|
+ }
|
|
|
struct lowl_usb_endpoint * const ep = usb_open_ep_pair(h, 0x81, 64, 0x01, 64);
|
|
|
usb_ep_set_timeouts_ms(ep, 100, 0);
|
|
|
|