mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: [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>
(cherry picked from commit 7cebf2ee8b)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
@@ -472,7 +472,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)
|
||||
|
||||
Reference in New Issue
Block a user