Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284055
b: refs/heads/master
c: 360b70c
h: refs/heads/master
i:
  284053: 2144b7d
  284051: d2256d2
  284047: 497a2e3
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 2, 2012
1 parent 233d488 commit 7452892
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: e2257db325e8031a149c0f8e3f228d02d08ae578
refs/heads/master: 360b70ca5e4668c9b9e24d8b200e7069bec83b4e
11 changes: 3 additions & 8 deletions trunk/sound/soc/codecs/alc5623.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,8 @@ static int alc5623_i2c_probe(struct i2c_client *client,

dev_dbg(&client->dev, "Found codec id : alc56%02x\n", vid2);

alc5623 = kzalloc(sizeof(struct alc5623_priv), GFP_KERNEL);
alc5623 = devm_kzalloc(&client->dev, sizeof(struct alc5623_priv),
GFP_KERNEL);
if (alc5623 == NULL)
return -ENOMEM;

Expand All @@ -1044,7 +1045,6 @@ static int alc5623_i2c_probe(struct i2c_client *client,
alc5623_dai.name = "alc5623-hifi";
break;
default:
kfree(alc5623);
return -EINVAL;
}

Expand All @@ -1053,20 +1053,15 @@ static int alc5623_i2c_probe(struct i2c_client *client,

ret = snd_soc_register_codec(&client->dev,
&soc_codec_device_alc5623, &alc5623_dai, 1);
if (ret != 0) {
if (ret != 0)
dev_err(&client->dev, "Failed to register codec: %d\n", ret);
kfree(alc5623);
}

return ret;
}

static int alc5623_i2c_remove(struct i2c_client *client)
{
struct alc5623_priv *alc5623 = i2c_get_clientdata(client);

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

Expand Down

0 comments on commit 7452892

Please sign in to comment.