Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284032
b: refs/heads/master
c: 80c2f9d
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 28, 2011
1 parent cc028c4 commit ff67223
Show file tree
Hide file tree
Showing 2 changed files with 2 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: 30c88f2ca89d6c0706ab585beca3730c9d7524de
refs/heads/master: 80c2f9da4ecba2ba2ab65ddc058190b1be28d9e5
6 changes: 1 addition & 5 deletions trunk/sound/soc/codecs/adau1373.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,24 +1360,20 @@ static int __devinit adau1373_i2c_probe(struct i2c_client *client,
struct adau1373 *adau1373;
int ret;

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

dev_set_drvdata(&client->dev, adau1373);

ret = snd_soc_register_codec(&client->dev, &adau1373_codec_driver,
adau1373_dai_driver, ARRAY_SIZE(adau1373_dai_driver));
if (ret < 0)
kfree(adau1373);

return ret;
}

static int __devexit adau1373_i2c_remove(struct i2c_client *client)
{
snd_soc_unregister_codec(&client->dev);
kfree(dev_get_drvdata(&client->dev));
return 0;
}

Expand Down

0 comments on commit ff67223

Please sign in to comment.