staging: comedi: das08: No need to check insn->n for counter config
authorIan Abbott <abbotti@mev.co.uk>
Fri, 31 Aug 2012 19:41:40 +0000 (20:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 19:00:42 +0000 (12:00 -0700)
There is no need to check the value of `insn->n` is correct in
`das08_counter_config()` as the core comedi module will have already
checked it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das08.c

index 9a97bc2aa2f16f21dd8c040075642e632753306c..4d1d882cfa2afe5fe3708ccf7d5f73c59f2ab282 100644 (file)
@@ -466,9 +466,6 @@ static int das08_counter_config(struct comedi_device *dev,
        unsigned long i8254_iobase = dev->iobase + thisboard->i8254_offset;
        int chan = insn->chanspec;
 
-       if (insn->n != 2)
-               return -EINVAL;
-
        switch (data[0]) {
        case INSN_CONFIG_SET_COUNTER_MODE:
                i8254_set_mode(i8254_iobase, 0, chan, data[1]);