From 2144b7da3ff300856b026167ac2e7fff0068c984 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 29 Dec 2011 12:08:36 +0800 Subject: [PATCH] --- yaml --- r: 284053 b: refs/heads/master c: a8163023d29c1439a2447f5203694bef3ed1c61c h: refs/heads/master i: 284051: d2256d2595248d1f8cb33b8d265d63eb6afff65a v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/tlv320aic26.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 8ab93c933fc0..f17634ab0d78 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 099830608a04a7194d00228084bb08130f761084 +refs/heads/master: a8163023d29c1439a2447f5203694bef3ed1c61c diff --git a/trunk/sound/soc/codecs/tlv320aic26.c b/trunk/sound/soc/codecs/tlv320aic26.c index 86d1fa38ed2e..a038daec682b 100644 --- a/trunk/sound/soc/codecs/tlv320aic26.c +++ b/trunk/sound/soc/codecs/tlv320aic26.c @@ -416,7 +416,7 @@ static int aic26_spi_probe(struct spi_device *spi) dev_dbg(&spi->dev, "probing tlv320aic26 spi device\n"); /* Allocate driver data */ - aic26 = kzalloc(sizeof *aic26, GFP_KERNEL); + aic26 = devm_kzalloc(&spi->dev, sizeof *aic26, GFP_KERNEL); if (!aic26) return -ENOMEM; @@ -427,18 +427,12 @@ static int aic26_spi_probe(struct spi_device *spi) ret = snd_soc_register_codec(&spi->dev, &aic26_soc_codec_dev, &aic26_dai, 1); - if (ret < 0) - kfree(aic26); return ret; - - dev_dbg(&spi->dev, "SPI device initialized\n"); - return 0; } static int aic26_spi_remove(struct spi_device *spi) { snd_soc_unregister_codec(&spi->dev); - kfree(spi_get_drvdata(spi)); return 0; }