From 5e37ed37b1a70a65185736fbec543ca4ad64a673 Mon Sep 17 00:00:00 2001 From: Domen Puncer Date: Sun, 25 Jun 2006 05:49:27 -0700 Subject: [PATCH] [PATCH] au1550_ac97: spin_unlock in error path Error paths didn't spin_unlock. Signed-off-by: Domen Puncer Signed-off-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/au1550_ac97.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 9011abe241..2e009427d6 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c @@ -213,7 +213,8 @@ rdcodec(struct ac97_codec *codec, u8 addr) } if (i == POLL_COUNT) { err("rdcodec: read poll expired!"); - return 0; + data = 0; + goto out; } /* wait for command done? @@ -226,7 +227,8 @@ rdcodec(struct ac97_codec *codec, u8 addr) } if (i == POLL_COUNT) { err("rdcodec: read cmdwait expired!"); - return 0; + data = 0; + goto out; } data = au_readl(PSC_AC97CDC) & 0xffff; @@ -237,6 +239,7 @@ rdcodec(struct ac97_codec *codec, u8 addr) au_writel(PSC_AC97EVNT_CD, PSC_AC97EVNT); au_sync(); + out: spin_unlock_irqrestore(&s->lock, flags); return data; -- 2.39.5