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 <xiaoxiang@xiaomi.com>
Change-Id: Ib957be1b1b5a686faea0196bc9069e0908a492eb
This commit is contained in:
Xiang Xiao 2021-06-11 04:55:04 -07:00 committed by David Sidrane
parent fad34e04c4
commit 4e038c1724
1 changed files with 0 additions and 2 deletions

View File

@ -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++)