Commit dd64d1ef authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbduxsigma: check for invalid 'ao_timer' in all cases

Make sure to check that the 'ao_timer' value is valid for both the
high speed and low speed cases in usbduxsigma_ao_cmdtest().
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b986be85
...@@ -994,9 +994,9 @@ static int usbduxsigma_ao_cmdtest(struct comedi_device *dev, ...@@ -994,9 +994,9 @@ static int usbduxsigma_ao_cmdtest(struct comedi_device *dev,
* we get all channels at once * we get all channels at once
*/ */
devpriv->ao_timer = cmd->scan_begin_arg / 1000000; devpriv->ao_timer = cmd->scan_begin_arg / 1000000;
}
if (devpriv->ao_timer < 1) if (devpriv->ao_timer < 1)
err |= -EINVAL; err |= -EINVAL;
}
if (cmd->stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT) {
/* not continuous, use counter */ /* not continuous, use counter */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment