Skip to content

Commit

Permalink
staging: comedi: drivers (core): remove BUG_ON in comedi_auto_unconfig()
Browse files Browse the repository at this point in the history
comedi_find_board_minor() will always return a ninor number between
0 and < COMEDI_NUM_BOARD_MINORS, or -ENODEV if a minor is not found.

Remove the unnecessary BUG_ON().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 21, 2013
1 parent 57b71c3 commit de59c28
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ void comedi_auto_unconfig(struct device *hardware_device)
minor = comedi_find_board_minor(hardware_device);
if (minor < 0)
return;
BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
comedi_free_board_minor(minor);
}
EXPORT_SYMBOL_GPL(comedi_auto_unconfig);
Expand Down

0 comments on commit de59c28

Please sign in to comment.