mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
[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>
This commit is contained in:
parent
f348b4d323
commit
7cebf2ee8b
1 changed files with 1 additions and 1 deletions
|
@ -468,7 +468,7 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
|
||||||
if (retval) {
|
if (retval) {
|
||||||
module_put(cdev->owner);
|
module_put(cdev->owner);
|
||||||
ir->open--;
|
ir->open--;
|
||||||
} else {
|
} else if (ir->buf) {
|
||||||
lirc_buffer_clear(ir->buf);
|
lirc_buffer_clear(ir->buf);
|
||||||
}
|
}
|
||||||
if (ir->task)
|
if (ir->task)
|
||||||
|
|
Loading…
Reference in a new issue