Skip to content

Commit

Permalink
V4L/DVB: IR/lirc_dev: check for valid irctl in unregister path
Browse files Browse the repository at this point in the history
Prompted by Red Hat bugzilla #633023

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 04292fc commit df1868e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/IR/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit df1868e

Please sign in to comment.