diff --git a/native_usb.cpp b/native_usb.cpp index ee64fdf..4645d7f 100755 --- a/native_usb.cpp +++ b/native_usb.cpp @@ -42,7 +42,6 @@ int native_usb::open_usb(int vid, int pid) if(r != 0) { qDebug("Detach Kernel Driver: %s", libusb_error_name(r)); - return -1; } #endif @@ -191,6 +190,10 @@ int native_usb::close_usb() return -1; } +#if defined(Q_OS_LINUX) + libusb_attach_kernel_driver(usb, 0); +#endif + libusb_close(usb); libusb_exit(NULL);