[media] lirc_dev: return POLLHUP and POLLERR when device is gone
authorDavid Härdeman <david@hardeman.nu>
Mon, 1 May 2017 16:04:37 +0000 (13:04 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Jun 2017 12:06:06 +0000 (09:06 -0300)
Most drivers return both values when the device is gone.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/lirc_dev.c

index e01b6e6..7860597 100644 (file)
@@ -372,7 +372,7 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
        }
 
        if (!ir->attached)
-               return POLLERR;
+               return POLLHUP | POLLERR;
 
        if (ir->buf) {
                poll_wait(file, &ir->buf->wait_poll, wait);