OSDN Git Service

staging: comedi: s626: fix cmd->stop_arg validation for stop_src == TRIG_COUNT
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Sep 2014 23:16:04 +0000 (16:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Sep 2014 21:35:22 +0000 (14:35 -0700)
commit32f9ff7039eb59eaef0c153328601ac6164b746a
tree5572b57ea16b4e6cabae70436bea0f9d2c7c7da3
parent8b9505527e5560297be00094fb4819b0e91e4138
staging: comedi: s626: fix cmd->stop_arg validation for stop_src == TRIG_COUNT

The only limit for the stop_arg with a stop_src == TRIG_COUNT is that there is at
least 1 scan in order to prevent an empty acquisition. The max test is bogus.

Fix the validation.

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