Skip to content

Commit

Permalink
[media] lirc_dev: call cdev_del *after* irctl cleanup
Browse files Browse the repository at this point in the history
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 22, 2010
1 parent 715d29a commit 09c8dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/IR/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 09c8dd8

Please sign in to comment.