summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-09-17 18:12:31 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 01:06:08 -0200
commitdf1868e4ee605444bbb98505126bdfb3519749af (patch)
treed0b9edb41c55ca9cf28260817ec430ec3efc4638
parent04292fc0031a28d298dfa03c4cd9ce6abef9b4e0 (diff)
downloadtalos-op-linux-df1868e4ee605444bbb98505126bdfb3519749af.tar.gz
talos-op-linux-df1868e4ee605444bbb98505126bdfb3519749af.zip
V4L/DVB: IR/lirc_dev: check for valid irctl in unregister path
Prompted by Red Hat bugzilla #633023 Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/IR/lirc_dev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c
index 899891bec352..0572053a7944 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -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);
OpenPOWER on IntegriCloud