diff options
author | Barry Song <21cnbao@gmail.com> | 2009-08-14 00:06:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-14 12:53:02 -0400 |
commit | 2a708137fd7d3e0928f27157aaed8aba404b11c9 (patch) | |
tree | 3003c358817a7bd3fb09f23d95f2ac8e194ba9c1 /sound/soc/codecs/ad1938.c | |
parent | 9028935d752ede57b086ab1bfe2420d4cba80127 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c index 051f68cc9977..e62b27701a49 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) | |||
456 | 456 | ||
457 | static struct spi_driver ad1938_spi_driver = { | 457 | static struct spi_driver ad1938_spi_driver = { |
458 | .driver = { | 458 | .driver = { |
459 | .name = "ad1938-spi", | 459 | .name = "ad1938", |
460 | .bus = &spi_bus_type, | 460 | .bus = &spi_bus_type, |
461 | .owner = THIS_MODULE, | 461 | .owner = THIS_MODULE, |
462 | }, | 462 | }, |
@@ -543,6 +543,7 @@ static int ad1938_register(struct ad1938_priv *ad1938) | |||
543 | ret = snd_soc_register_codec(codec); | 543 | ret = snd_soc_register_codec(codec); |
544 | if (ret != 0) { | 544 | if (ret != 0) { |
545 | dev_err(codec->dev, "Failed to register codec: %d\n", ret); | 545 | dev_err(codec->dev, "Failed to register codec: %d\n", ret); |
546 | kfree(ad1938); | ||
546 | return ret; | 547 | return ret; |
547 | } | 548 | } |
548 | 549 | ||
@@ -550,6 +551,7 @@ static int ad1938_register(struct ad1938_priv *ad1938) | |||
550 | if (ret != 0) { | 551 | if (ret != 0) { |
551 | dev_err(codec->dev, "Failed to register DAI: %d\n", ret); | 552 | dev_err(codec->dev, "Failed to register DAI: %d\n", ret); |
552 | snd_soc_unregister_codec(codec); | 553 | snd_soc_unregister_codec(codec); |
554 | kfree(ad1938); | ||
553 | return ret; | 555 | return ret; |
554 | } | 556 | } |
555 | 557 | ||