From: Ian Abbott Date: Fri, 8 Jun 2012 09:26:06 +0000 (+0100) Subject: amplc_pci230: Fix dangling spin-lock X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8f7fcdd5126316566126a9d5b7c0eabaae30df67;p=comedi.git amplc_pci230: Fix dangling spin-lock pci230_ao_inttrig_scan_begin() could return without releasing a spin-lock. Fix it. Spotted by Dan Carpenter in the "staging" sources. Signed-off-by: Ian Abbott --- diff --git a/comedi/drivers/amplc_pci230.c b/comedi/drivers/amplc_pci230.c index e1ea2b49..fdbead33 100644 --- a/comedi/drivers/amplc_pci230.c +++ b/comedi/drivers/amplc_pci230.c @@ -1443,6 +1443,9 @@ static int pci230_ao_inttrig_scan_begin(comedi_device * dev, /* Delay. Should driver be responsible for this? */ /* XXX TODO: See if DAC busy bit can be used. */ comedi_udelay(8); + } else { + comedi_spin_unlock_irqrestore(&devpriv-> ao_stop_spinlock, + irqflags); } return 1;