Staging: comedi: das1800.c: fix a locking error on the error path.
Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b74a967085
commit
d18c5906d0
@ -1637,7 +1637,8 @@ static int das1800_ai_rinsn(struct comedi_device *dev,
|
||||
}
|
||||
if (i == timeout) {
|
||||
comedi_error(dev, "timeout");
|
||||
return -ETIME;
|
||||
n = -ETIME;
|
||||
goto exit;
|
||||
}
|
||||
dpnt = inw(dev->iobase + DAS1800_FIFO);
|
||||
/* shift data to offset binary for bipolar ranges */
|
||||
@ -1645,6 +1646,7 @@ static int das1800_ai_rinsn(struct comedi_device *dev,
|
||||
dpnt += 1 << (thisboard->resolution - 1);
|
||||
data[n] = dpnt;
|
||||
}
|
||||
exit:
|
||||
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
|
||||
|
||||
return n;
|
||||
|
Loading…
Reference in New Issue
Block a user