Skip to contentSkip to conversation

staging: comedi: amplc_pci230: add a missing unlock

PATCH Dan Carpenter 2 participants 2 messages Jun 8, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This side of the if else statement returned with the lock held and IRQs disabled.

drivers/staging/comedi/drivers/amplc_pci230.c +2 -0
index 30487be..f2ad35c 100644
@@ -1387,6 +1387,8 @@ static int pci230_ao_inttrig_scan_begin(struct comedi_device *dev,
 		/* Delay.  Should driver be responsible for this? */
 		/* XXX TODO: See if DAC busy bit can be used. */
 		udelay(8);
+	} else {
+		spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, irqflags);
 	}
 
 	return 1;
#1 lore raw

drivers/staging/comedi/drivers/amplc_pci230.c static int pci230_ao_inttrig_scan_begin(struct comedi_device *dev, · line 1392

Quoted 12 lines · Dan Carpenter

This side of the if else statement returned with the lock held and IRQs disabled.

drivers/staging/comedi/drivers/amplc_pci230.c +2 -0
@@ -1387,6 +1387,8 @@ static int pci230_ao_inttrig_scan_begin(struct comedi_device *dev,
 		/* Delay.  Should driver be responsible for this? */
 		/* XXX TODO: See if DAC busy bit can be used. */
 		udelay(8);
+	} else {
+		spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, irqflags);
 	}

Thanks for catching that! I'll fix it in the out-of-kernel Comedi sources as well.

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]>             )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587              )=-