usb-device: Do not reattach kernel driver if USB interface is not used

This commit is contained in:
Pali Rohár committed 2016-05-12 00:18:02 +02:00
1 parent cf95375177
commit 8a433f2d7a
1 file changed
+3
+3
View File
@@ -78,6 +78,9 @@ static void usb_flash_device_info_print(const struct usb_flash_device * dev) {
static void usb_reattach_kernel_driver(libusb_device_handle * udev, int interface) { static void usb_reattach_kernel_driver(libusb_device_handle * udev, int interface) {
if ( interface < 0 )
return;
PRINTF_LINE("Reattach kernel driver to USB interface..."); PRINTF_LINE("Reattach kernel driver to USB interface...");
PRINTF_END(); PRINTF_END();
libusb_release_interface(udev, interface); libusb_release_interface(udev, interface);