Commit d52f042c authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: s526: remove unneeded check in s526_gpct_rinsn()

The comedi core validates insn->n before calling this function.
Remove the unnecessary check.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 898143bd
...@@ -217,11 +217,6 @@ static int s526_gpct_rinsn(struct comedi_device *dev, ...@@ -217,11 +217,6 @@ static int s526_gpct_rinsn(struct comedi_device *dev,
unsigned short datalow; unsigned short datalow;
unsigned short datahigh; unsigned short datahigh;
/* Check if (n > 0) */
if (insn->n <= 0) {
printk(KERN_ERR "s526: INSN_READ: n should be > 0\n");
return -EINVAL;
}
/* Read the low word first */ /* Read the low word first */
for (i = 0; i < insn->n; i++) { for (i = 0; i < insn->n; i++) {
datalow = inw(dev->iobase + REG_C0L + counter_channel * 8); datalow = inw(dev->iobase + REG_C0L + counter_channel * 8);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment