aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2012-09-19 15:09:57 -0700
committerGreg Kroah-Hartman <[email protected]>2012-09-21 09:19:42 -0700
commitd52f042ce5d64bbc56160e3653de064d380120c7 (patch)
tree06068a4d70e1e21bd85214c5cb378b39fe70b861
parent898143bd1ac1550f3b2b2eaf397b13fc1d1889d1 (diff)
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: H Hartley Sweeten <[email protected]> Cc: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/comedi/drivers/s526.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c
index 75e3e58e552a..f9f0fdaec159 100644
--- a/drivers/staging/comedi/drivers/s526.c
+++ b/drivers/staging/comedi/drivers/s526.c
@@ -217,11 +217,6 @@ static int s526_gpct_rinsn(struct comedi_device *dev,
unsigned short datalow;
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 */
for (i = 0; i < insn->n; i++) {
datalow = inw(dev->iobase + REG_C0L + counter_channel * 8);