From 9bdbbfca186c898a2b76f63a384553eda0b5ed82 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 29 Dec 2011 12:07:30 +0800 Subject: [PATCH] --- yaml --- r: 284052 b: refs/heads/master c: 099830608a04a7194d00228084bb08130f761084 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/tlv320aic23.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b23949cf3718..8ab93c933fc0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d999c021b64289b571e5d295deade44e40cbcc4f +refs/heads/master: 099830608a04a7194d00228084bb08130f761084 diff --git a/trunk/sound/soc/codecs/tlv320aic23.c b/trunk/sound/soc/codecs/tlv320aic23.c index 60d08aeac22a..dfa41a96599b 100644 --- a/trunk/sound/soc/codecs/tlv320aic23.c +++ b/trunk/sound/soc/codecs/tlv320aic23.c @@ -634,7 +634,7 @@ static int tlv320aic23_codec_probe(struct i2c_client *i2c, if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return -EINVAL; - aic23 = kzalloc(sizeof(struct aic23), GFP_KERNEL); + aic23 = devm_kzalloc(&i2c->dev, sizeof(struct aic23), GFP_KERNEL); if (aic23 == NULL) return -ENOMEM; @@ -643,14 +643,11 @@ static int tlv320aic23_codec_probe(struct i2c_client *i2c, ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_tlv320aic23, &tlv320aic23_dai, 1); - if (ret < 0) - kfree(aic23); return ret; } static int __exit tlv320aic23_i2c_remove(struct i2c_client *i2c) { snd_soc_unregister_codec(&i2c->dev); - kfree(i2c_get_clientdata(i2c)); return 0; }