The comedi core validates that the 'chan' is valid for the subdevice
before calling the (*insn_read) operation. Remove the unnecessary check.
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>
switch (aref) {
case AREF_GROUND:
case AREF_COMMON:
- if (chan >= board->ai_nchan) {
- dev_err(dev->class_dev,
- "Analog input is not available\n");
- return -EINVAL;
- }
entry |= ME4000_AI_LIST_INPUT_SINGLE_ENDED | chan;
break;