Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157546
b: refs/heads/master
c: 1a01417
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Jul 5, 2009
1 parent d1a3726 commit e402c90
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe5422fc4ac221910083e603eb2a873280a9bd37
refs/heads/master: 1a01417e85846e42e939a345a294e8ae2287cc1f
16 changes: 11 additions & 5 deletions trunk/sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,8 @@ static int wm8960_register(struct wm8960_priv *wm8960)

if (wm8960_codec) {
dev_err(codec->dev, "Another WM8960 is registered\n");
return -EINVAL;
ret = -EINVAL;
goto err;
}

if (!pdata) {
Expand Down Expand Up @@ -843,7 +844,7 @@ static int wm8960_register(struct wm8960_priv *wm8960)
ret = wm8960_reset(codec);
if (ret < 0) {
dev_err(codec->dev, "Failed to issue reset\n");
return ret;
goto err;
}

wm8960_dai.dev = codec->dev;
Expand Down Expand Up @@ -877,17 +878,22 @@ static int wm8960_register(struct wm8960_priv *wm8960)
ret = snd_soc_register_codec(codec);
if (ret != 0) {
dev_err(codec->dev, "Failed to register codec: %d\n", ret);
return ret;
goto err;
}

ret = snd_soc_register_dai(&wm8960_dai);
if (ret != 0) {
dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
snd_soc_unregister_codec(codec);
return ret;
goto err_codec;
}

return 0;

err_codec:
snd_soc_unregister_codec(codec);
err:
kfree(wm8960);
return ret;
}

static void wm8960_unregister(struct wm8960_priv *wm8960)
Expand Down

0 comments on commit e402c90

Please sign in to comment.