summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/lirc_dev.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-01-20 10:10:11 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-31 07:32:27 -0200
commit7cebf2ee8b7e39c06c93b593b0848a7baf9e73a8 (patch)
treee19d4f2950663d328c8a9364dc67980245f685be /drivers/media/rc/lirc_dev.c
parentf348b4d323a67a5639ccbd3de5add5383573e4a5 (diff)
downloadblackbird-op-linux-7cebf2ee8b7e39c06c93b593b0848a7baf9e73a8.tar.gz
blackbird-op-linux-7cebf2ee8b7e39c06c93b593b0848a7baf9e73a8.zip
[media] lirc: fix null dereference for tx-only devices
tx-only RC devices do not have a receive buffer. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r--drivers/media/rc/lirc_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index e0e2297f13d1..0030ce01babc 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -468,7 +468,7 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
if (retval) {
module_put(cdev->owner);
ir->open--;
- } else {
+ } else if (ir->buf) {
lirc_buffer_clear(ir->buf);
}
if (ir->task)
OpenPOWER on IntegriCloud