aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/rc/lirc_dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 1e0545a67959..4de0e85af805 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -553,14 +553,14 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
553 if (!ir->attached) 553 if (!ir->attached)
554 return POLLERR; 554 return POLLERR;
555 555
556 poll_wait(file, &ir->buf->wait_poll, wait); 556 if (ir->buf) {
557 poll_wait(file, &ir->buf->wait_poll, wait);
557 558
558 if (ir->buf)
559 if (lirc_buffer_empty(ir->buf)) 559 if (lirc_buffer_empty(ir->buf))
560 ret = 0; 560 ret = 0;
561 else 561 else
562 ret = POLLIN | POLLRDNORM; 562 ret = POLLIN | POLLRDNORM;
563 else 563 } else
564 ret = POLLERR; 564 ret = POLLERR;
565 565
566 dev_dbg(ir->d.dev, LOGHEAD "poll result = %d\n", 566 dev_dbg(ir->d.dev, LOGHEAD "poll result = %d\n",