Commit df1868e4 authored by Jarod Wilson's avatar Jarod Wilson Committed by Mauro Carvalho Chehab

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

Prompted by Red Hat bugzilla #633023
Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 04292fc0
...@@ -366,6 +366,11 @@ int lirc_unregister_driver(int minor) ...@@ -366,6 +366,11 @@ int lirc_unregister_driver(int minor)
} }
ir = irctls[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); mutex_lock(&lirc_dev_lock);
......
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