diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index 226c0d52ff0053ecb04a9a3339d106d165a7fad1..04ba9e69b00a2f5a92bb7cf60e9190f47efca080 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -219,16 +219,17 @@ static int rti800_ai_insn_read(struct comedi_device *dev, static int rti800_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s, - struct comedi_insn *insn, unsigned int *data) + struct comedi_insn *insn, + unsigned int *data) { struct rti800_private *devpriv = dev->private; - int i; int chan = CR_CHAN(insn->chanspec); + int i; for (i = 0; i < insn->n; i++) data[i] = devpriv->ao_readback[chan]; - return i; + return insn->n; } static int rti800_ao_insn_write(struct comedi_device *dev,