diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-04-17 10:07:46 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-22 10:21:29 -0700 |
commit | 860b7c398a744c1eef42a59b661e870aca12d9be (patch) | |
tree | 3f6534fab742cd167791f29dfc0d5776b54b0b08 /drivers/staging/comedi/drivers/pcl812.c | |
parent | 5089b058966c4f6a5ca33556ca8c3bc88be0ab4c (diff) |
staging: comedi: drivers: core validates chanlist_len max
The comedi core checks if the (cmd->chanlist_len > s->len_chanlist) when the
comedi_cmd is copied from user to kernel space by __comedi_get_user_cmd().
If so, the core returns -EINVAL and will not call the subdevice (*do_cmdtest)
and (*do_cmd).
Remove the unnecessary "max" checks in the comedi driver (*do_cmdtest) and
helper functions.
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>
Diffstat (limited to 'drivers/staging/comedi/drivers/pcl812.c')
-rw-r--r-- | drivers/staging/comedi/drivers/pcl812.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index 5cc01fe45cf2..0cf115e54308 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -761,7 +761,6 @@ static int pcl812_ai_cmdtest(struct comedi_device *dev, err |= cfc_check_trigger_arg_is(&cmd->convert_arg, 0); err |= cfc_check_trigger_arg_min(&cmd->chanlist_len, 1); - err |= cfc_check_trigger_arg_max(&cmd->chanlist_len, MAX_CHANLIST_LEN); err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len); if (cmd->stop_src == TRIG_COUNT) |