From 780200fc3966297a66c900288a909a681b85354b Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 29 Dec 2011 12:12:29 +0800 Subject: [PATCH] --- yaml --- r: 284058 b: refs/heads/master c: 6945e9f9dfee897891a8ac620ce1621a2daf7e02 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/tpa6130a2.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3cf8abd5c6a7..bda1abb6f8d8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a54877d7456ffa88c95d7eb587971792cb1892d6 +refs/heads/master: 6945e9f9dfee897891a8ac620ce1621a2daf7e02 diff --git a/trunk/sound/soc/codecs/tpa6130a2.c b/trunk/sound/soc/codecs/tpa6130a2.c index 7eeca79d7387..363b99dad8e9 100644 --- a/trunk/sound/soc/codecs/tpa6130a2.c +++ b/trunk/sound/soc/codecs/tpa6130a2.c @@ -376,7 +376,7 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client, return -ENODEV; } - data = kzalloc(sizeof(*data), GFP_KERNEL); + data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); if (data == NULL) { dev_err(dev, "Can not allocate memory\n"); return -ENOMEM; @@ -450,7 +450,6 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client, if (data->power_gpio >= 0) gpio_free(data->power_gpio); err_gpio: - kfree(data); tpa6130a2_client = NULL; return ret; @@ -466,8 +465,6 @@ static int __devexit tpa6130a2_remove(struct i2c_client *client) gpio_free(data->power_gpio); regulator_put(data->supply); - - kfree(data); tpa6130a2_client = NULL; return 0;