diff options
author | Jarod Wilson <jarod@redhat.com> | 2010-10-18 22:30:20 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-23 00:05:36 +0200 |
commit | 09c8dd8de67cf781be95d809cd45af22f40c37df (patch) | |
tree | 14a53c50f055548742e9ac406bc4d385aa64ac58 /drivers/media | |
parent | [media] lirc_dev: more error-checking improvements (diff) | |
download | linux-09c8dd8de67cf781be95d809cd45af22f40c37df.tar.xz linux-09c8dd8de67cf781be95d809cd45af22f40c37df.zip |
[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')
-rw-r--r-- | drivers/media/IR/lirc_dev.c | 2 |
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) ir->d.set_use_dec(ir->d.data); module_put(ir->cdev.owner); mutex_unlock(&ir->irctl_lock); - cdev_del(&ir->cdev); } else { lirc_irctl_cleanup(ir); cdev_del(&ir->cdev); @@ -492,6 +491,7 @@ int lirc_dev_fop_close(struct inode *inode, struct file *file) module_put(ir->cdev.owner); } else { lirc_irctl_cleanup(ir); + cdev_del(&ir->cdev); irctls[ir->d.minor] = NULL; kfree(ir); } |