From: H Hartley Sweeten Date: Mon, 21 Jan 2013 21:37:46 +0000 (-0700) Subject: staging: comedi: drivers (core): remove BUG_ON in comedi_auto_unconfig() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=de59c285a4787dfc2ac4f2546ef0082ae08754e2;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: drivers (core): remove BUG_ON in comedi_auto_unconfig() 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 7e8ee5dde3be..1c7d4da9775a 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -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);