Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283989
b: refs/heads/master
c: 4273fcf
h: refs/heads/master
i:
  283987: f74d764
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 20, 2011
1 parent 73db6c9 commit 06dcddd
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 7246492dcf0e56d23f71194f8cd8722a681dfa47
refs/heads/master: 4273fcfd71285b4ab6a5d3ce3943e30c2975b797
7 changes: 2 additions & 5 deletions trunk/sound/soc/codecs/ak4641.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,24 +602,21 @@ static int __devinit ak4641_i2c_probe(struct i2c_client *i2c,
struct ak4641_priv *ak4641;
int ret;

ak4641 = kzalloc(sizeof(struct ak4641_priv), GFP_KERNEL);
ak4641 = devm_kzalloc(&i2c->dev, sizeof(struct ak4641_priv),
GFP_KERNEL);
if (!ak4641)
return -ENOMEM;

i2c_set_clientdata(i2c, ak4641);

ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_ak4641,
ak4641_dai, ARRAY_SIZE(ak4641_dai));
if (ret < 0)
kfree(ak4641);

return ret;
}

static int __devexit ak4641_i2c_remove(struct i2c_client *i2c)
{
snd_soc_unregister_codec(&i2c->dev);
kfree(i2c_get_clientdata(i2c));
return 0;
}

Expand Down

0 comments on commit 06dcddd

Please sign in to comment.