Browse Source

Only libusb close if libusb release succeeds.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
8ec78c28e0
  1. 2
      usbutils.c

2
usbutils.c

@ -1328,7 +1328,7 @@ void usb_uninit(struct cgpu_info *cgpu) @@ -1328,7 +1328,7 @@ void usb_uninit(struct cgpu_info *cgpu)
// if release_cgpu() was called due to a USB NODEV(err)
if (!cgpu->usbdev)
return;
libusb_release_interface(cgpu->usbdev->handle, cgpu->usbdev->found->interface);
if (!libusb_release_interface(cgpu->usbdev->handle, cgpu->usbdev->found->interface))
libusb_close(cgpu->usbdev->handle);
cgpu->usbdev = free_cgusb(cgpu->usbdev);
}

Loading…
Cancel
Save