Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [patch] au1550_ac97: spin_unlock in error path
@ 2006-06-22  9:29 Domen Puncer
  2006-06-22 15:28 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Domen Puncer @ 2006-06-22  9:29 UTC (permalink / raw)
  To: linux-mips

Error paths didn't spin_unlock.

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>


Index: linux/sound/oss/au1550_ac97.c
===================================================================
--- linux.orig/sound/oss/au1550_ac97.c
+++ linux/sound/oss/au1550_ac97.c
@@ -214,7 +214,8 @@ rdcodec(struct ac97_codec *codec, u8 add
 	}
 	if (i == POLL_COUNT) {
 		err("rdcodec: read poll expired!");
-		return 0;
+		data = 0;
+		goto out;
 	}
 
 	/* wait for command done?
@@ -227,7 +228,8 @@ rdcodec(struct ac97_codec *codec, u8 add
 	}
 	if (i == POLL_COUNT) {
 		err("rdcodec: read cmdwait expired!");
-		return 0;
+		data = 0;
+		goto out;
 	}
 
 	data = au_readl(PSC_AC97CDC) & 0xffff;
@@ -238,6 +240,7 @@ rdcodec(struct ac97_codec *codec, u8 add
 	au_writel(PSC_AC97EVNT_CD, PSC_AC97EVNT);
 	au_sync();
 
+ out:
 	spin_unlock_irqrestore(&s->lock, flags);
 
 	return data;

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

* Re: [patch] au1550_ac97: spin_unlock in error path
  2006-06-22  9:29 [patch] au1550_ac97: spin_unlock in error path Domen Puncer
@ 2006-06-22 15:28 ` Sergei Shtylyov
  2006-06-22 16:53   ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2006-06-22 15:28 UTC (permalink / raw)
  To: Domen Puncer; +Cc: linux-mips

Hello.

Domen Puncer wrote:

> Error paths didn't spin_unlock.

    Dang, we missed it while fixing the spinlocks in that driver. Thank you 
for noticing. Not sure if Ralf would be eaegr to apply though. :-)

WBR, Sergei

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

* Re: [patch] au1550_ac97: spin_unlock in error path
  2006-06-22 15:28 ` Sergei Shtylyov
@ 2006-06-22 16:53   ` Ralf Baechle
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2006-06-22 16:53 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Domen Puncer, linux-mips

On Thu, Jun 22, 2006 at 07:28:49PM +0400, Sergei Shtylyov wrote:

>    Dang, we missed it while fixing the spinlocks in that driver. Thank you 
> for noticing. Not sure if Ralf would be eaegr to apply though. :-)

I feed it to upstream, so it will eventually show up in the tree on
the indirect path.

  Ralf

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

end of thread, other threads:[~2006-06-22 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22  9:29 [patch] au1550_ac97: spin_unlock in error path Domen Puncer
2006-06-22 15:28 ` Sergei Shtylyov
2006-06-22 16:53   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox