summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 899891b..0572053 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);