From e0f4a76d6cfca8eeec175db2fdb7cfda8a135d44 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 25 May 2023 13:01:34 +0300 Subject: [PATCH] fs_poll: Fix wrong return value in CONFIG_BUILD_KERNEL The exit condition below does not work: if (ret < 0) { set_errno(-ret); return ERROR; } else { return count; } --- fs/vfs/fs_poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c index f4219aa7c39..267a542da52 100644 --- a/fs/vfs/fs_poll.c +++ b/fs/vfs/fs_poll.c @@ -393,7 +393,7 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout) { /* Out of memory */ - ret = ENOMEM; + ret = -ENOMEM; goto out_with_cancelpt; }