From 77557d8d9f87767ec8f42d2e4f456986dc9749c8 Mon Sep 17 00:00:00 2001 From: Lingao Meng Date: Thu, 23 Jun 2022 14:33:30 +0800 Subject: [PATCH] drivers: serial: Add error for insuff buffer Signed-off-by: Lingao Meng --- drivers/serial/uart_bth4.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/serial/uart_bth4.c b/drivers/serial/uart_bth4.c index c63af7e3ef..f5c68ee62f 100644 --- a/drivers/serial/uart_bth4.c +++ b/drivers/serial/uart_bth4.c @@ -174,6 +174,10 @@ static int uart_bth4_receive(FAR struct bt_driver_s *drv, uart_bth4_pollnotify(dev, POLLIN); } } + else + { + ret = -ENOMEM; + } leave_critical_section(flags); return ret;