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>
}
if (i == POLL_COUNT) {
err("rdcodec: read poll expired!");
- return 0;
+ data = 0;
+ goto out;
}
/* wait for command done?
}
if (i == POLL_COUNT) {
err("rdcodec: read cmdwait expired!");
- return 0;
+ data = 0;
+ goto out;
}
data = au_readl(PSC_AC97CDC) & 0xffff;
au_writel(PSC_AC97EVNT_CD, PSC_AC97EVNT);
au_sync();
+ out:
spin_unlock_irqrestore(&s->lock, flags);
return data;