提交 7cebf2ee 编写于 作者: S Sean Young 提交者: 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: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册