ASoC: Fix snd_soc_{new, free}_ac97_codec() locking removal
diff mbox

Message ID 1411438548-8463-1-git-send-email-lars@metafoo.de
State Accepted
Commit 8c8f2f6fc1c8eec9e14810f21386fe295a42a40f
Headers show

Commit Message

Lars-Peter Clausen Sept. 23, 2014, 2:15 a.m. UTC
Commit e3f205a72c45 ("ASoC: Remove locking in
snd_soc_{new,free}_ac97_codec()") overlooked a unlock on one of the error
paths.

Fixes: e3f205a72c45 ("ASoC: Remove locking in snd_soc_{new,free}_ac97_codec()")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/soc-core.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Mark Brown Sept. 23, 2014, 1:45 p.m. UTC | #1
On Tue, Sep 23, 2014 at 04:15:48AM +0200, Lars-Peter Clausen wrote:
> Commit e3f205a72c45 ("ASoC: Remove locking in
> snd_soc_{new,free}_ac97_codec()") overlooked a unlock on one of the error
> paths.

Applied, thanks.

Patch
diff mbox

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f7e4ede..5b88fde 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1967,7 +1967,6 @@  int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
 	if (codec->ac97->bus == NULL) {
 		kfree(codec->ac97);
 		codec->ac97 = NULL;
-		mutex_unlock(&codec->mutex);
 		return -ENOMEM;
 	}