From b8fd59e770646c616653ff8ea00c23a7242d9de0 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 28 Mar 2022 18:53:36 +0200 Subject: [PATCH] ftdipp_mpsse: don't display error when attach kernel driver, when the device hasn't been detach before or when driver isn't loaded. --- src/ftdipp_mpsse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ftdipp_mpsse.cpp b/src/ftdipp_mpsse.cpp index 339a9d2..b870653 100644 --- a/src/ftdipp_mpsse.cpp +++ b/src/ftdipp_mpsse.cpp @@ -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