From c4237a2b59432a6ebf73f813ad9e94ab408bb8f1 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 10 Aug 2015 13:14:00 -0700 Subject: [PATCH] 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 2e69f5a4e7ec..f7db91ca974e 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -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); -- 2.20.1