summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorH Hartley Sweeten2015-08-10 22:14:02 +0200
committerGreg Kroah-Hartman2015-08-15 03:35:49 +0200
commit6b3703f4cb763d57ab26f2ad262a30cc7f87093c (patch)
treefbd59690de303b0dc0c9f4e37d9ea3ebf317b694 /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: comedi_fops: remove remaining BUG_ON() checks (diff)
downloadkernel-qcow2-linux-6b3703f4cb763d57ab26f2ad262a30cc7f87093c.tar.gz
kernel-qcow2-linux-6b3703f4cb763d57ab26f2ad262a30cc7f87093c.tar.xz
kernel-qcow2-linux-6b3703f4cb763d57ab26f2ad262a30cc7f87093c.zip
staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup()
The BUG_ON() checks in this function are not necessary. comedi_cleanup_board_minors() clears all the entries in the comedi_board_minor_table array and will call comedi_device_cleanup() for all attached devices. comedi_device_cleanup() will then clear the entries in the comedi_subdevice_minor_table array with comedi_free_subdevice_minor(). Remove the BUG_ON(), drivers should not crash the kernel. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 62526ddcb48c..93b37e245f96 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2930,14 +2930,7 @@ module_init(comedi_init);
static void __exit comedi_cleanup(void)
{
- int i;
-
comedi_cleanup_board_minors();
- for (i = 0; i < COMEDI_NUM_BOARD_MINORS; ++i)
- BUG_ON(comedi_board_minor_table[i]);
- for (i = 0; i < COMEDI_NUM_SUBDEVICE_MINORS; ++i)
- BUG_ON(comedi_subdevice_minor_table[i]);
-
class_destroy(comedi_class);
cdev_del(&comedi_cdev);
unregister_chrdev_region(MKDEV(COMEDI_MAJOR, 0), COMEDI_NUM_MINORS);