]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] au1550_ac97: spin_unlock in error path
authorDomen Puncer <domen.puncer@ultra.si>
Sun, 25 Jun 2006 12:49:27 +0000 (05:49 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:25 +0000 (10:01 -0700)
Error paths didn't spin_unlock.

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/au1550_ac97.c

index 9011abe241abdb5be10596d66ccd39ad43ca9b7e..2e009427d633be2effb8a783cb6383ffe7356b92 100644 (file)
@@ -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;