summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-11-12 13:03:41 +0000
committerRichard Hughes <richard@hughsie.com>2015-11-12 13:03:41 +0000
commitfa14df5f410ab05ed2e3ca1f82969d15942740ff (patch)
tree34d8026e42e112be912cf66ae82fd9b2b077c46b
parent7561b53eed51776b393e0b5e270cb07d637835a9 (diff)
downloadgusb-fa14df5f410ab05ed2e3ca1f82969d15942740ff.tar.gz
Ignore the not-found error when resetting a device
This is what most USB device will return for success.
-rw-r--r--gusb/gusb-device.c2
1 files changed, 2 insertions, 0 deletions
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);
}