Need to check result of down_interruptible(). Return -EINTR if it fails.
authorIan Abbott <abbotti@mev.co.uk>
Tue, 15 Jul 2008 12:57:40 +0000 (12:57 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 15 Jul 2008 12:57:40 +0000 (12:57 +0000)
comedi/drivers/quatech_daqp_cs.c

index e8308fe8eb205b42552ced9d5183929a25f9d15f..2eb1f976875942cdf25b055add9595d165943788 100644 (file)
@@ -432,7 +432,8 @@ static int daqp_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
 
                /* Wait for interrupt service routine to unblock semaphore */
                /* Maybe could use a timeout here, but it's interruptible */
-               down_interruptible(&local->eos);
+               if (down_interruptible(&local->eos))
+                       return -EINTR;
 
                data[i] = inb(dev->iobase + DAQP_FIFO);
                data[i] |= inb(dev->iobase + DAQP_FIFO) << 8;