mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 10:31:54 +00:00
[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>
This commit is contained in:
parent
715d29a744
commit
09c8dd8de6
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user