From: Ian Abbott Date: Tue, 15 Jul 2008 12:57:40 +0000 (+0000) Subject: Need to check result of down_interruptible(). Return -EINTR if it fails. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=712c50e7483278c8611ccf5a4e19185779342499;p=comedi.git Need to check result of down_interruptible(). Return -EINTR if it fails. --- diff --git a/comedi/drivers/quatech_daqp_cs.c b/comedi/drivers/quatech_daqp_cs.c index e8308fe8..2eb1f976 100644 --- a/comedi/drivers/quatech_daqp_cs.c +++ b/comedi/drivers/quatech_daqp_cs.c @@ -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;