Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src()

This BUG() can never happen. The previous ni_tio_has_gate2_registers()
check will have already caused the function to return -EINVAL.

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>

authored by

H Hartley Sweeten and committed by
Greg Kroah-Hartman
fa74d136 592ef9fb

+1 -2
+1 -2
drivers/staging/comedi/drivers/ni_tio.c
··· 1020 1020 case ni_gpct_variant_660x: 1021 1021 return ni_660x_set_gate2(counter, src); 1022 1022 default: 1023 - BUG(); 1024 - break; 1023 + return -EINVAL; 1025 1024 } 1026 1025 break; 1027 1026 default: