diff --git a/libraries/AP_EFI/AP_EFI_Serial_Lutan.cpp b/libraries/AP_EFI/AP_EFI_Serial_Lutan.cpp index f4315c5047..89eade4ee9 100644 --- a/libraries/AP_EFI/AP_EFI_Serial_Lutan.cpp +++ b/libraries/AP_EFI/AP_EFI_Serial_Lutan.cpp @@ -53,9 +53,9 @@ void AP_EFI_Serial_Lutan::update() if (n + pkt_nbytes > sizeof(pkt)) { pkt_nbytes = 0; } - const ssize_t nread = port->read(&pkt[pkt_nbytes], n); - if (nread <= 0) { - return; + ssize_t nread = port->read(&pkt[pkt_nbytes], n); + if (nread < 0) { + nread = 0; } pkt_nbytes += nread; if (pkt_nbytes > 2) {