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>
Showing
Please register or sign in to comment