Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284034
b: refs/heads/master
c: 38b81c1
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 28, 2011
1 parent 6435b3c commit 9804170
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: 6e4f17cb2b7e8a5327ccc5a6a32442acd408c190
refs/heads/master: 38b81c1d2517d7c4a6685d49136474bcd0105ab9
6 changes: 1 addition & 5 deletions trunk/sound/soc/codecs/adau1701.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,23 +496,19 @@ static __devinit int adau1701_i2c_probe(struct i2c_client *client,
struct adau1701 *adau1701;
int ret;

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

i2c_set_clientdata(client, adau1701);
ret = snd_soc_register_codec(&client->dev, &adau1701_codec_drv,
&adau1701_dai, 1);
if (ret < 0)
kfree(adau1701);

return ret;
}

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

Expand Down

0 comments on commit 9804170

Please sign in to comment.