kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* staging: comedi: amplc_pci230: add a missing unlock
@ 2012-06-08  6:52 Dan Carpenter
  2012-06-08  9:09 ` Ian Abbott
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-06-08  6:52 UTC (permalink / raw)
  To: kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
index 30487be..f2ad35c 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: staging: comedi: amplc_pci230: add a missing unlock
  2012-06-08  6:52 staging: comedi: amplc_pci230: add a missing unlock Dan Carpenter
@ 2012-06-08  9:09 ` Ian Abbott
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Abbott @ 2012-06-08  9:09 UTC (permalink / raw)
  To: kernel-janitors

On 2012/06/08 07:52 AM, Dan Carpenter wrote:
> This side of the if else statement returned with the lock held and IRQs
> disabled.

> --- a/drivers/staging/comedi/drivers/amplc_pci230.c
> +++ b/drivers/staging/comedi/drivers/amplc_pci230.c
> @@ -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.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk>             )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587              )=-

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-08  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08  6:52 staging: comedi: amplc_pci230: add a missing unlock Dan Carpenter
2012-06-08  9:09 ` Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).