projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b74a967
)
Staging: comedi: das1800.c: fix a locking error on the error path.
author
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 4 May 2010 23:06:33 +0000
(16:06 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 11 May 2010 18:36:08 +0000
(11:36 -0700)
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/das1800.c
patch
|
blob
|
history
diff --git
a/drivers/staging/comedi/drivers/das1800.c
b/drivers/staging/comedi/drivers/das1800.c
index d91c2d9d595b0d60345278d718040ba6dfc4526b..de5e82fec8781dd5d43416d6a58fdf63839fe2d2 100644
(file)
--- 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;