Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284029
b: refs/heads/master
c: 512fa7c
h: refs/heads/master
i:
  284027: c3c3c5c
v: v3
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Dec 28, 2011
1 parent f5f6e9e commit faae472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: cf1ee98d800459e6f055742f84355b1aa9e937ae
refs/heads/master: 512fa7c40b9e808000eac31458668369e131a243
14 changes: 3 additions & 11 deletions trunk/sound/soc/codecs/sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,30 +1401,22 @@ static __devinit int sgtl5000_i2c_probe(struct i2c_client *client,
struct sgtl5000_priv *sgtl5000;
int ret;

sgtl5000 = kzalloc(sizeof(struct sgtl5000_priv), GFP_KERNEL);
sgtl5000 = devm_kzalloc(&client->dev, sizeof(struct sgtl5000_priv),
GFP_KERNEL);
if (!sgtl5000)
return -ENOMEM;

i2c_set_clientdata(client, sgtl5000);

ret = snd_soc_register_codec(&client->dev,
&sgtl5000_driver, &sgtl5000_dai, 1);
if (ret) {
dev_err(&client->dev, "Failed to register codec: %d\n", ret);
kfree(sgtl5000);
return ret;
}

return 0;
return ret;
}

static __devexit int sgtl5000_i2c_remove(struct i2c_client *client)
{
struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);

snd_soc_unregister_codec(&client->dev);

kfree(sgtl5000);
return 0;
}

Expand Down

0 comments on commit faae472

Please sign in to comment.