From 4e038c1724e14f6d81370a6a75a4f671b3bbbbd1 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 11 Jun 2021 04:55:04 -0700 Subject: [PATCH] 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 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 d540983448..99c7514880 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++)