summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ad1938.c
diff options
context:
space:
mode:
authorBarry Song <21cnbao@gmail.com>2009-08-14 12:06:38 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-08-14 17:53:02 +0100
commit2a708137fd7d3e0928f27157aaed8aba404b11c9 (patch)
tree3003c358817a7bd3fb09f23d95f2ac8e194ba9c1 /sound/soc/codecs/ad1938.c
parent9028935d752ede57b086ab1bfe2420d4cba80127 (diff)
ASoC: delete -spi suffix in ad1938 and free private data while registers fail
Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ad1938.c')
-rw-r--r--sound/soc/codecs/ad1938.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c
index 051f68cc997..e62b27701a4 100644
--- a/sound/soc/codecs/ad1938.c
+++ b/sound/soc/codecs/ad1938.c
@@ -456,7 +456,7 @@ static int __devexit ad1938_spi_remove(struct spi_device *spi)
static struct spi_driver ad1938_spi_driver = {
.driver = {
- .name = "ad1938-spi",
+ .name = "ad1938",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
@@ -543,6 +543,7 @@ static int ad1938_register(struct ad1938_priv *ad1938)
ret = snd_soc_register_codec(codec);
if (ret != 0) {
dev_err(codec->dev, "Failed to register codec: %d\n", ret);
+ kfree(ad1938);
return ret;
}
@@ -550,6 +551,7 @@ static int ad1938_register(struct ad1938_priv *ad1938)
if (ret != 0) {
dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
snd_soc_unregister_codec(codec);
+ kfree(ad1938);
return ret;
}