From: David Härdeman Date: Mon, 1 May 2017 16:04:37 +0000 (-0300) Subject: [media] lirc_dev: return POLLHUP and POLLERR when device is gone X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29debf3d9d214f600af38069e5954699934abe74;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] lirc_dev: return POLLHUP and POLLERR when device is gone Most drivers return both values when the device is gone. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index e01b6e635704..786059745f90 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -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);