]> git.ipfire.org Git - thirdparty/linux.git/commit - drivers/comedi/comedi_fops.c
staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 10 Aug 2015 20:14:01 +0000 (13:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Aug 2015 01:35:49 +0000 (18:35 -0700)
commit5104a8988723b405c9e033b7e57267ebdd387d4d
tree2a8e5be9a44e19628e27d28d026a5c3a6b58029a
parent6b3703f4cb763d57ab26f2ad262a30cc7f87093c
staging: comedi: comedi_fops: remove BUG_ON() in comedi_free_subdevice_minor()

Drivers should not crash the kernel.

This function is only called by comedi_device_detach_cleanup() and the
s->minor will always be valid or the device wouldn't have attached in
the first place.

Leave the checks for safety in accessing the comedi_subdevice_minor_table
array but remove the BUG_ON() calls.

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