Commit 7cebf2ee authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

[media] lirc: fix null dereference for tx-only devices

tx-only RC devices do not have a receive buffer.
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent f348b4d3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment