From 25f079b5c6c3720bf92cc2c693c64ac6861a6db5 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Wed, 24 Jun 2020 20:59:53 -0400 Subject: [PATCH] POSIX FTDI: Fix a bug where closing device successfully returned an error --- platform/posix/ftdi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/posix/ftdi.cpp b/platform/posix/ftdi.cpp index bc65e4f..317d94d 100644 --- a/platform/posix/ftdi.cpp +++ b/platform/posix/ftdi.cpp @@ -91,7 +91,7 @@ bool FTDI::close() { writeThread.join(); bool ret = ftdi.closeDevice(); - if(ret != 0) + if(!ret) report(APIEvent::Type::DriverFailedToClose, APIEvent::Severity::Error); uint8_t flush;