Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e37ed37 authored by Domen Puncer's avatar Domen Puncer Committed by Linus Torvalds
Browse files

[PATCH] au1550_ac97: spin_unlock in error path



Error paths didn't spin_unlock.

Signed-off-by: default avatarDomen Puncer <domen.puncer@ultra.si>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7d93a1a5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;