Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283862
b: refs/heads/master
c: 0d1fe0d
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 3, 2011
1 parent 0024dc6 commit 5446594
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: b03e96e4d619183cbe9aea55f2340596c1fecf64
refs/heads/master: 0d1fe0d4521436d8af2111045a682c4c8aa1b55d
11 changes: 4 additions & 7 deletions trunk/sound/soc/codecs/wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
return -EINVAL;
}

priv = kzalloc(sizeof(struct wm8350_data), GFP_KERNEL);
priv = devm_kzalloc(codec->dev, sizeof(struct wm8350_data),
GFP_KERNEL);
if (priv == NULL)
return -ENOMEM;
snd_soc_codec_set_drvdata(codec, priv);
Expand All @@ -1564,7 +1565,7 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
ret = regulator_bulk_get(wm8350->dev, ARRAY_SIZE(priv->supplies),
priv->supplies);
if (ret != 0)
goto err_priv;
return ret;

wm8350->codec.codec = codec;
codec->control_data = wm8350;
Expand Down Expand Up @@ -1640,10 +1641,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
wm8350_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

return 0;

err_priv:
kfree(priv);
return ret;
}

static int wm8350_codec_remove(struct snd_soc_codec *codec)
Expand Down Expand Up @@ -1676,7 +1673,7 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec)
wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA);

regulator_bulk_free(ARRAY_SIZE(priv->supplies), priv->supplies);
kfree(priv);

return 0;
}

Expand Down

0 comments on commit 5446594

Please sign in to comment.