]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: comedi_fops: remove BUG_ON() in comedi_dev_get_from_board_minor()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 10 Aug 2015 20:14:00 +0000 (13:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 01:35:49 +0000 (18:35 -0700)
This function is only called by comedi_dev_get_from_minor() and the 'minor'
value will always be < COMEDI_NUM_BOARD_MINORS. Remove the unnecessary
BUG_ON().

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>
drivers/staging/comedi/comedi_fops.c

index 2e69f5a4e7ecd79e7ee7cda9060d085d915d4fed..f7db91ca974e56f8c6d6287df1bcb56f7a8cbd15 100644 (file)
@@ -227,7 +227,6 @@ static struct comedi_device *comedi_dev_get_from_board_minor(unsigned minor)
 {
        struct comedi_device *dev;
 
-       BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
        mutex_lock(&comedi_board_minor_table_lock);
        dev = comedi_dev_get(comedi_board_minor_table[minor]);
        mutex_unlock(&comedi_board_minor_table_lock);