stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [char-misc-next 5/6 RESEND] mei: fix fasync return value on error
       [not found] <1452170799-16960-1-git-send-email-tomas.winkler@intel.com>
@ 2016-01-07 12:46 ` Tomas Winkler
  0 siblings, 0 replies; only message in thread
From: Tomas Winkler @ 2016-01-07 12:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Alexander Usyskin, linux-kernel, Tomas Winkler, stable, Al Viro

fasync should return a negative value on error
and not poll mask POLLERR.

Cc: <stable@vger.kernel.org> # 4.3+
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 1ee8b492fc4a..36ca15234344 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -653,7 +653,9 @@ out:
  * @file: pointer to file structure
  * @band: band bitmap
  *
- * Return: poll mask
+ * Return: negative on error,
+ *         0 if it did no changes,
+ *         and positive a process was added or deleted
  */
 static int mei_fasync(int fd, struct file *file, int band)
 {
@@ -661,7 +663,7 @@ static int mei_fasync(int fd, struct file *file, int band)
 	struct mei_cl *cl = file->private_data;
 
 	if (!mei_cl_is_connected(cl))
-		return POLLERR;
+		return -ENODEV;
 
 	return fasync_helper(fd, file, band, &cl->ev_async);
 }
-- 
2.4.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-07 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1452170799-16960-1-git-send-email-tomas.winkler@intel.com>
2016-01-07 12:46 ` [char-misc-next 5/6 RESEND] mei: fix fasync return value on error Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).