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;
    }
This commit is contained in:
Ville Juven 2023-05-25 13:01:34 +03:00 committed by Xiang Xiao
parent 84c7a4dd69
commit e0f4a76d6c

View File

@ -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;
}