Skip to content

Commit

Permalink
[PATCH] au1550_ac97: spin_unlock in error path
Browse files Browse the repository at this point in the history
Error paths didn't spin_unlock.

Signed-off-by: Domen Puncer <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Domen Puncer authored and Linus Torvalds committed Jun 25, 2006
1 parent 7d93a1a commit 5e37ed3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/oss/au1550_ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 5e37ed3

Please sign in to comment.