Skip to content

Commit e0f4a76

Browse files
pussuwxiaoxiang781216
authored andcommitted
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; }
1 parent 84c7a4d commit e0f4a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/vfs/fs_poll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout)
393393
{
394394
/* Out of memory */
395395

396-
ret = ENOMEM;
396+
ret = -ENOMEM;
397397
goto out_with_cancelpt;
398398
}
399399

0 commit comments

Comments
 (0)