You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2021/06/11 15:22:50 UTC

[incubator-nuttx] branch master updated: serial/pty: Don't return -NOSYS if pollfd::events equals 0

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

davids5 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 4e038c1  serial/pty: Don't return -NOSYS if pollfd::events equals 0
4e038c1 is described below

commit 4e038c1724e14f6d81370a6a75a4f671b3bbbbd1
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jun 11 04:55:04 2021 -0700

    serial/pty: Don't return -NOSYS if pollfd::events equals 0
    
    since the caller is free not to monitor any event
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
    Change-Id: Ib957be1b1b5a686faea0196bc9069e0908a492eb
---
 drivers/serial/pty.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c
index d540983..99c7514 100644
--- a/drivers/serial/pty.c
+++ b/drivers/serial/pty.c
@@ -944,8 +944,6 @@ static int pty_poll(FAR struct file *filep, FAR struct pollfd *fds,
       return ret;
     }
 
-  ret = -ENOSYS;
-
   if (setup)
     {
       for (i = 0; i < CONFIG_DEV_PTY_NPOLLWAITERS; i++)