Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284056
b: refs/heads/master
c: 7fd8a67
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 2, 2012
1 parent 7452892 commit 52d6a2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 360b70ca5e4668c9b9e24d8b200e7069bec83b4e
refs/heads/master: 7fd8a67446aded9d25e0ae1d94d19105f1620af5
6 changes: 2 additions & 4 deletions trunk/sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
i2c_client->addr);
dev_info(&i2c_client->dev, "hardware revision %X\n", ret & 0xF);

cs4270 = kzalloc(sizeof(struct cs4270_private), GFP_KERNEL);
cs4270 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs4270_private),
GFP_KERNEL);
if (!cs4270) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
return -ENOMEM;
Expand All @@ -682,8 +683,6 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,

ret = snd_soc_register_codec(&i2c_client->dev,
&soc_codec_device_cs4270, &cs4270_dai, 1);
if (ret < 0)
kfree(cs4270);
return ret;
}

Expand All @@ -696,7 +695,6 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
static int cs4270_i2c_remove(struct i2c_client *i2c_client)
{
snd_soc_unregister_codec(&i2c_client->dev);
kfree(i2c_get_clientdata(i2c_client));
return 0;
}

Expand Down

0 comments on commit 52d6a2f

Please sign in to comment.