提交 df1868e4 编写于 作者: J Jarod Wilson 提交者: Mauro Carvalho Chehab

V4L/DVB: IR/lirc_dev: check for valid irctl in unregister path

Prompted by Red Hat bugzilla #633023
Signed-off-by: NJarod Wilson <jarod@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 04292fc0
......@@ -366,6 +366,11 @@ int lirc_unregister_driver(int minor)
}
ir = irctls[minor];
if (!ir) {
printk(KERN_ERR "lirc_dev: lirc_unregister_driver: "
"failed to get irctl struct for minor %d!", minor);
return -ENOENT;
}
mutex_lock(&lirc_dev_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册