staging: comedi: cb_pcidas64: remove unnecessary Step 2b test in (*do_cmdtest)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Apr 2014 22:52:31 +0000 (15:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2014 21:07:50 +0000 (14:07 -0700)
This test is unnecessary. The cfc_check_trigger_src() in Step 1 ensures that
the trigger source is one of these values and Step 2 makes sure it's only one
of these values.

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/cb_pcidas64.c

index 4061f0481de2c56e9d06d14777adc4f00e15f80c..0e13ac9f34736b47a21a0723a77bb0a2025dfd9b 100644 (file)
@@ -2078,9 +2078,6 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
 
        if (cmd->convert_src == TRIG_EXT && cmd->scan_begin_src == TRIG_TIMER)
                err |= -EINVAL;
-       if (cmd->stop_src != TRIG_COUNT &&
-           cmd->stop_src != TRIG_NONE && cmd->stop_src != TRIG_EXT)
-               err |= -EINVAL;
 
        if (err)
                return 2;