diff mbox

isdn: gigaset: add missing unlock

Message ID 20100806082323.GU9031@bicker
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Dan Carpenter Aug. 6, 2010, 8:23 a.m. UTC
We should unlock here.  This is the only place where we return from the
function with the lock held.  The caller isn't expecting it.

Signed-off-by: Dan Carpenter <error27@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Aug. 8, 2010, 6:04 a.m. UTC | #1
From: Dan Carpenter <error27@gmail.com>
Date: Fri, 6 Aug 2010 10:23:23 +0200

> We should unlock here.  This is the only place where we return from the
> function with the lock held.  The caller isn't expecting it.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tilman Schmidt Aug. 8, 2010, 12:50 p.m. UTC | #2
Am 06.08.2010 10:23 schrieb Dan Carpenter:
> We should unlock here.  This is the only place where we return from the
> function with the lock held.  The caller isn't expecting it.

Thanks, good catch.

> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Tilman Schmidt <tilman@imap.cc>

> 
> diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
> index e5ea344..bcc174e 100644
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -1052,6 +1052,7 @@ static inline void remove_appl_from_channel(struct bc_state *bcs,
>  	do {
>  		if (bcap->bcnext == ap) {
>  			bcap->bcnext = bcap->bcnext->bcnext;
> +			spin_unlock_irqrestore(&bcs->aplock, flags);
>  			return;
>  		}
>  		bcap = bcap->bcnext;
diff mbox

Patch

diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index e5ea344..bcc174e 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1052,6 +1052,7 @@  static inline void remove_appl_from_channel(struct bc_state *bcs,
 	do {
 		if (bcap->bcnext == ap) {
 			bcap->bcnext = bcap->bcnext->bcnext;
+			spin_unlock_irqrestore(&bcs->aplock, flags);
 			return;
 		}
 		bcap = bcap->bcnext;