diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-04 16:06:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:36:08 -0700 |
commit | d18c5906d0914d911a13d342ff61a6bca6aff597 (patch) | |
tree | 1132543146b8bc9deb84180173f78a7af3fe46d0 /drivers/staging/comedi | |
parent | b74a9670857c2af74e36ecbd31bbc55ddd8e1311 (diff) | |
download | kernel_samsung_smdk4412-d18c5906d0914d911a13d342ff61a6bca6aff597.zip kernel_samsung_smdk4412-d18c5906d0914d911a13d342ff61a6bca6aff597.tar.gz kernel_samsung_smdk4412-d18c5906d0914d911a13d342ff61a6bca6aff597.tar.bz2 |
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/das1800.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index d91c2d9..de5e82f 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -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; |