From 8f7fcdd5126316566126a9d5b7c0eabaae30df67 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 8 Jun 2012 10:26:06 +0100 Subject: [PATCH] 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 --- comedi/drivers/amplc_pci230.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.26.2