diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c index ba5f1a9920..26795e2062 100644 --- a/fs/vfs/fs_poll.c +++ b/fs/vfs/fs_poll.c @@ -343,12 +343,22 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) /* Yes, it does... Setup the poll */ ret = inode->u.i_ops->poll(filep, fds, setup); + if (ret < 0) + { + ferr("poll failed:%p, setup:%d, ret:%d\n", + inode->u.i_ops->poll, setup, ret); + } } #ifndef CONFIG_DISABLE_MOUNTPOINT else if (INODE_IS_MOUNTPT(inode) && inode->u.i_mops != NULL && inode->u.i_mops->poll != NULL) { ret = inode->u.i_mops->poll(filep, fds, setup); + if (ret < 0) + { + ferr("poll failed:%p, setup:%d, ret:%d\n", + inode->u.i_ops->poll, setup, ret); + } } #endif