diff --git a/driver-icarus.c b/driver-icarus.c index 63d86b88..850b65a5 100644 --- a/driver-icarus.c +++ b/driver-icarus.c @@ -330,6 +330,9 @@ static int icarus_get_nonce(struct cgpu_info *icarus, unsigned char *buf, struct cgtime(tv_start); while (true) { + if (icarus->usbinfo.nodev) + return ICA_NONCE_ERROR; + cgtime(&read_start); err = usb_read_timeout(icarus, (char *)buf, read_amount, &amt, ICARUS_WAIT_TIMEOUT, C_GETRESULTS); cgtime(&read_finish); diff --git a/usbutils.c b/usbutils.c index 72b66e4d..36de7cbe 100644 --- a/usbutils.c +++ b/usbutils.c @@ -1279,8 +1279,6 @@ static struct cg_usb_device *free_cgusb(struct cg_usb_device *cgusb) void usb_uninit(struct cgpu_info *cgpu) { - int err; - applog(LOG_DEBUG, "USB uninit %s%i", cgpu->drv->name, cgpu->device_id); @@ -1288,7 +1286,7 @@ void usb_uninit(struct cgpu_info *cgpu) // if release_cgpu() was called due to a USB NODEV(err) if (!cgpu->usbdev) return; - err = libusb_release_interface(cgpu->usbdev->handle, cgpu->usbdev->found->interface); + libusb_release_interface(cgpu->usbdev->handle, cgpu->usbdev->found->interface); libusb_close(cgpu->usbdev->handle); cgpu->usbdev = free_cgusb(cgpu->usbdev); }