Commit c4237a2b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: comedi_fops: remove BUG_ON() in comedi_dev_get_from_board_minor()

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5104a898
...@@ -227,7 +227,6 @@ static struct comedi_device *comedi_dev_get_from_board_minor(unsigned minor) ...@@ -227,7 +227,6 @@ static struct comedi_device *comedi_dev_get_from_board_minor(unsigned minor)
{ {
struct comedi_device *dev; struct comedi_device *dev;
BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
mutex_lock(&comedi_board_minor_table_lock); mutex_lock(&comedi_board_minor_table_lock);
dev = comedi_dev_get(comedi_board_minor_table[minor]); dev = comedi_dev_get(comedi_board_minor_table[minor]);
mutex_unlock(&comedi_board_minor_table_lock); mutex_unlock(&comedi_board_minor_table_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment