ret = comedi_timeout(dev, s, insn, pci9111_ai_eoc, 0);
if (ret) {
- data[i] = 0;
pci9111_fifo_reset(dev);
return ret;
}
ret = comedi_timeout(dev, s, insn, pci9118_ai_eoc, 0);
if (ret) {
- data[n] = 0;
outl(0, dev->iobase + PCI9118_DELFIFO); /* flush FIFO */
return ret;
}
if (ret) {
outb(0, dev->iobase + PCI171x_CLRFIFO);
outb(0, dev->iobase + PCI171x_CLRINT);
- data[n] = 0;
return ret;
}
udelay(10);
ret = comedi_timeout(dev, s, insn, dyna_pci10xx_ai_eoc, 0);
- if (ret) {
- data[n] = 0;
+ if (ret)
break;
- }
/* read data */
d = inw_p(dev->iobase);
/* Wait for conversion to complete, or get fed up waiting */
ret = comedi_timeout(dev, s, insn, icp_multi_ai_eoc, 0);
- if (ret) {
- /* Clear data received */
- data[n] = 0;
+ if (ret)
break;
- }
data[n] =
(readw(devpriv->io_addr + ICP_MULTI_AI) >> 4) & 0x0fff;
ret = comedi_timeout(dev, s, insn, pcl816_ai_eoc, 0);
if (ret) {
- data[0] = 0;
/* clear INT (conversion end) flag */
outb(0, dev->iobase + PCL816_CLRINT);
return ret;