ftdipp_mpsse: don't display error when attach kernel driver, when the device hasn't been detach before or when driver isn't loaded.

This commit is contained in:
Gwenhael Goavec-Merou 2022-03-28 18:53:36 +02:00
parent 27f0ff2816
commit b8fd59e770
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ int FTDIpp_MPSSE::close_device()
/* libusb_attach_kernel_driver is only available on Linux. */
if (_ftdi->module_detach_mode == AUTO_DETACH_SIO_MODULE) {
rtn = libusb_attach_kernel_driver(_ftdi->usb_dev, _ftdi->interface);
if( rtn != 0)
if( rtn != 0 && rtn != LIBUSB_ERROR_NOT_FOUND)
fprintf(stderr, "detach error %d\n", rtn);
}
#endif