Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284021
b: refs/heads/master
c: eb3bb97
h: refs/heads/master
i:
  284019: 3b604e9
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 27, 2011
1 parent 433244f commit 5740d58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: 306bf6b19ee3da824fbdbdb2dc4e5d62a8983a2c
refs/heads/master: eb3bb97ce73ac666d9c3d16fc250fa0b78e3b8f2
13 changes: 2 additions & 11 deletions trunk/sound/soc/codecs/lm4857.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static int __devinit lm4857_i2c_probe(struct i2c_client *i2c,
struct lm4857 *lm4857;
int ret;

lm4857 = kzalloc(sizeof(*lm4857), GFP_KERNEL);
lm4857 = devm_kzalloc(&i2c->dev, sizeof(*lm4857), GFP_KERNEL);
if (!lm4857)
return -ENOMEM;

Expand All @@ -225,21 +225,12 @@ static int __devinit lm4857_i2c_probe(struct i2c_client *i2c,

ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_lm4857, NULL, 0);

if (ret) {
kfree(lm4857);
return ret;
}

return 0;
return ret;
}

static int __devexit lm4857_i2c_remove(struct i2c_client *i2c)
{
struct lm4857 *lm4857 = i2c_get_clientdata(i2c);

snd_soc_unregister_codec(&i2c->dev);
kfree(lm4857);

return 0;
}

Expand Down

0 comments on commit 5740d58

Please sign in to comment.