]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ni_tio: remove BUG() in ni_tio_set_gate_src()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Mar 2016 22:37:03 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
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>
drivers/staging/comedi/drivers/ni_tio.c

index 10d4585ab25ccc6d5766400ba0594843b70b718c..9ce3a9a92a9a4654a261330693596cd18e1e8565 100644 (file)
@@ -1020,8 +1020,7 @@ int ni_tio_set_gate_src(struct ni_gpct *counter,
                case ni_gpct_variant_660x:
                        return ni_660x_set_gate2(counter, src);
                default:
-                       BUG();
-                       break;
+                       return -EINVAL;
                }
                break;
        default: