summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-08-05 10:44:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-07 15:03:27 -0700
commit03611e5491e488f30a5b7653e02ee65032cfba14 (patch)
tree0a1ce9b877a66f92d33a0e69ab9216d871611845 /drivers/staging/comedi
parent31bebc030fb2a6e2e7e7ea19ce58a0f196280281 (diff)
staging: comedi: me4000: remove 'chan' check in me4000_ai_insn_read()
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/me4000.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index 171749b06ef2..d6b7adc19056 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -477,11 +477,6 @@ static int me4000_ai_insn_read(struct comedi_device *dev,
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;