summaryrefslogtreecommitdiff
path: root/gusb/gusb-device.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2011-11-08 09:45:08 +0000
committerRichard Hughes <richard@hughsie.com>2011-11-08 09:45:08 +0000
commit3219b11c57b80eeadd56941523e98fdd86686b70 (patch)
tree1e8a4d298c499ab396bb85b88a4a30e16cd2997e /gusb/gusb-device.c
parent362121b8f62e258f4da7286603e8c63b6e9f961b (diff)
downloadgusb-3219b11c57b80eeadd56941523e98fdd86686b70.tar.gz
Ignore EBUSY when trying to detach a kernel driver that is not bound
Diffstat (limited to 'gusb/gusb-device.c')
-rw-r--r--gusb/gusb-device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c
index 745c99f..8070a30 100644
--- a/gusb/gusb-device.c
+++ b/gusb/gusb-device.c
@@ -334,7 +334,8 @@ gboolean g_usb_device_claim_interface (GUsbDevice *device,
rc = libusb_detach_kernel_driver (device->priv->handle,
interface);
if (rc != LIBUSB_SUCCESS &&
- rc != LIBUSB_ERROR_NOT_FOUND /* No driver attached */)
+ rc != LIBUSB_ERROR_NOT_FOUND && /* No driver attached */
+ rc != LIBUSB_ERROR_BUSY /* driver rebound already */)
return g_usb_device_libusb_error_to_gerror (device, rc,
error);
}