Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jarod Wilson and committed by
Mauro Carvalho Chehab
09c8dd8d 715d29a7

+1 -1
+1 -1
drivers/media/IR/lirc_dev.c
··· 402 402 ir->d.set_use_dec(ir->d.data); 403 403 module_put(ir->cdev.owner); 404 404 mutex_unlock(&ir->irctl_lock); 405 - cdev_del(&ir->cdev); 406 405 } else { 407 406 lirc_irctl_cleanup(ir); 408 407 cdev_del(&ir->cdev); ··· 491 492 module_put(ir->cdev.owner); 492 493 } else { 493 494 lirc_irctl_cleanup(ir); 495 + cdev_del(&ir->cdev); 494 496 irctls[ir->d.minor] = NULL; 495 497 kfree(ir); 496 498 }