From c88e1e3712bb2a88996ad1c2b8751c754f881ec9 Mon Sep 17 00:00:00 2001 From: Jiacheng Guo Date: Tue, 8 Jun 2021 19:49:37 +0800 Subject: [PATCH] openthread: fix wrong OpenThread uart read return value handling --- components/openthread/port/esp_openthread_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/openthread/port/esp_openthread_uart.c b/components/openthread/port/esp_openthread_uart.c index b91a5035b3..5f5668b9c6 100644 --- a/components/openthread/port/esp_openthread_uart.c +++ b/components/openthread/port/esp_openthread_uart.c @@ -119,7 +119,7 @@ esp_err_t esp_openthread_uart_process() if (rval > 0) { otPlatUartReceived(s_uart_buffer, (uint16_t)rval); - } else if (rval > 0) { + } else if (rval < 0) { if (errno != EAGAIN) { otLogWarnPlat("read uart failed: %d", errno); return ESP_FAIL;