aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/lirc_dev.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-10-18 16:30:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-22 18:05:36 -0400
commit09c8dd8de67cf781be95d809cd45af22f40c37df (patch)
tree14a53c50f055548742e9ac406bc4d385aa64ac58 /drivers/media/IR/lirc_dev.c
parent715d29a74450696696dc064f85ba4ff0eaadb1d2 (diff)
[media] lirc_dev: call cdev_del *after* irctl cleanup
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/lirc_dev.c')
-rw-r--r--drivers/media/IR/lirc_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c
index e3dbf12d00d9..8fdb7e11a138 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -402,7 +402,6 @@ int lirc_unregister_driver(int minor)
402 ir->d.set_use_dec(ir->d.data); 402 ir->d.set_use_dec(ir->d.data);
403 module_put(ir->cdev.owner); 403 module_put(ir->cdev.owner);
404 mutex_unlock(&ir->irctl_lock); 404 mutex_unlock(&ir->irctl_lock);
405 cdev_del(&ir->cdev);
406 } else { 405 } else {
407 lirc_irctl_cleanup(ir); 406 lirc_irctl_cleanup(ir);
408 cdev_del(&ir->cdev); 407 cdev_del(&ir->cdev);
@@ -492,6 +491,7 @@ int lirc_dev_fop_close(struct inode *inode, struct file *file)
492 module_put(ir->cdev.owner); 491 module_put(ir->cdev.owner);
493 } else { 492 } else {
494 lirc_irctl_cleanup(ir); 493 lirc_irctl_cleanup(ir);
494 cdev_del(&ir->cdev);
495 irctls[ir->d.minor] = NULL; 495 irctls[ir->d.minor] = NULL;
496 kfree(ir); 496 kfree(ir);
497 } 497 }