提交 09c8dd8d 编写于 作者: J Jarod Wilson 提交者: Mauro Carvalho Chehab

[media] lirc_dev: call cdev_del *after* irctl cleanup

Signed-off-by: NJarod Wilson <jarod@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 715d29a7
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册