]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_gate_src()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Mar 2016 22:37:01 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commit37d317a1a2c73166d3ad999e728b25d131d9b29c
tree53406fb21ef349720c87e31b11081826fe60a62a
parentea9c797c544c87787a5206c1d96e118de8a93dce
staging: comedi: ni_tio: remove BUG() checks for ni_tio_get_gate_src()

This function calls some helper functions to convert the counter variant
specific gate select bits into the generic enum ni_gpct_clock_source_bits
equivelent. These helper functions currently BUG() if the gate select
bits are invalid.

This should never happen but refactor the code to return -EINVAL instead
and remove the BUG() checks.

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/drivers/ni_tio.c