You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/06/23 08:50:50 UTC

[incubator-nuttx] branch master updated: drivers: serial: Add error for insuff buffer

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 77557d8d9f drivers: serial: Add error for insuff buffer
77557d8d9f is described below

commit 77557d8d9f87767ec8f42d2e4f456986dc9749c8
Author: Lingao Meng <me...@xiaomi.com>
AuthorDate: Thu Jun 23 14:33:30 2022 +0800

    drivers: serial: Add error for insuff buffer
    
    Signed-off-by: Lingao Meng <me...@xiaomi.com>
---
 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;