From fa14df5f410ab05ed2e3ca1f82969d15942740ff Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 12 Nov 2015 13:03:41 +0000 Subject: Ignore the not-found error when resetting a device This is what most USB device will return for success. --- gusb/gusb-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index ca8ec59..52dfa98 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -640,6 +640,8 @@ g_usb_device_reset (GUsbDevice *device, return g_usb_device_not_open_error (device, error); rc = libusb_reset_device (device->priv->handle); + if (rc == LIBUSB_ERROR_NOT_FOUND) + return TRUE; return g_usb_device_libusb_error_to_gerror (device, rc, error); } -- cgit v1.2.1