Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284045
b: refs/heads/master
c: 021b918
h: refs/heads/master
i:
  284043: d264d04
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 2, 2012
1 parent 7c164e1 commit cf6fcaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 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: 24b6f263d97cd2f1f2d579021af97fcd1d632a98
refs/heads/master: 021b918efb204b1deda7cfc7edef2972d98ffc46
8 changes: 2 additions & 6 deletions trunk/sound/soc/codecs/cs42l51.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,8 @@ static int cs42l51_i2c_probe(struct i2c_client *i2c_client,
dev_info(&i2c_client->dev, "found device cs42l51 rev %d\n",
ret & 7);

cs42l51 = kzalloc(sizeof(struct cs42l51_private), GFP_KERNEL);
cs42l51 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l51_private),
GFP_KERNEL);
if (!cs42l51) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
return -ENOMEM;
Expand All @@ -588,18 +589,13 @@ static int cs42l51_i2c_probe(struct i2c_client *i2c_client,

ret = snd_soc_register_codec(&i2c_client->dev,
&soc_codec_device_cs42l51, &cs42l51_dai, 1);
if (ret < 0)
kfree(cs42l51);
error:
return ret;
}

static int cs42l51_i2c_remove(struct i2c_client *client)
{
struct cs42l51_private *cs42l51 = i2c_get_clientdata(client);

snd_soc_unregister_codec(&client->dev);
kfree(cs42l51);
return 0;
}

Expand Down

0 comments on commit cf6fcaf

Please sign in to comment.