Skip to content

Commit

Permalink
Staging: comedi: das1800.c: fix a locking error on the error path.
Browse files Browse the repository at this point in the history
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed May 11, 2010
1 parent b74a967 commit d18c590
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/comedi/drivers/das1800.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,14 +1637,16 @@ 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 */
if ((conv_flags & UB) == 0)
dpnt += 1 << (thisboard->resolution - 1);
data[n] = dpnt;
}
exit:
spin_unlock_irqrestore(&dev->spinlock, irq_flags);

return n;
Expand Down

0 comments on commit d18c590

Please sign in to comment.