diff options
Diffstat (limited to 'sound/soc')
| -rw-r--r-- | sound/soc/codecs/cs4270.c | 25 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8753.c | 4 |
2 files changed, 20 insertions, 9 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index d68650de39bc..0bbd94501d7e 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
| @@ -681,7 +681,7 @@ static int cs4270_probe(struct platform_device *pdev) | |||
| 681 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 681 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
| 682 | if (ret < 0) { | 682 | if (ret < 0) { |
| 683 | printk(KERN_ERR "cs4270: failed to create PCMs\n"); | 683 | printk(KERN_ERR "cs4270: failed to create PCMs\n"); |
| 684 | return ret; | 684 | goto error_free_codec; |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | #ifdef USE_I2C | 687 | #ifdef USE_I2C |
| @@ -690,8 +690,7 @@ static int cs4270_probe(struct platform_device *pdev) | |||
| 690 | ret = i2c_add_driver(&cs4270_i2c_driver); | 690 | ret = i2c_add_driver(&cs4270_i2c_driver); |
| 691 | if (ret) { | 691 | if (ret) { |
| 692 | printk(KERN_ERR "cs4270: failed to attach driver"); | 692 | printk(KERN_ERR "cs4270: failed to attach driver"); |
| 693 | snd_soc_free_pcms(socdev); | 693 | goto error_free_pcms; |
| 694 | return ret; | ||
| 695 | } | 694 | } |
| 696 | 695 | ||
| 697 | /* Did we find a CS4270 on the I2C bus? */ | 696 | /* Did we find a CS4270 on the I2C bus? */ |
| @@ -713,10 +712,23 @@ static int cs4270_probe(struct platform_device *pdev) | |||
| 713 | ret = snd_soc_register_card(socdev); | 712 | ret = snd_soc_register_card(socdev); |
| 714 | if (ret < 0) { | 713 | if (ret < 0) { |
| 715 | printk(KERN_ERR "cs4270: failed to register card\n"); | 714 | printk(KERN_ERR "cs4270: failed to register card\n"); |
| 716 | snd_soc_free_pcms(socdev); | 715 | goto error_del_driver; |
| 717 | return ret; | ||
| 718 | } | 716 | } |
| 719 | 717 | ||
| 718 | return 0; | ||
| 719 | |||
| 720 | error_del_driver: | ||
| 721 | #ifdef USE_I2C | ||
| 722 | i2c_del_driver(&cs4270_i2c_driver); | ||
| 723 | |||
| 724 | error_free_pcms: | ||
| 725 | #endif | ||
| 726 | snd_soc_free_pcms(socdev); | ||
| 727 | |||
| 728 | error_free_codec: | ||
| 729 | kfree(socdev->codec); | ||
| 730 | socdev->codec = NULL; | ||
| 731 | |||
| 720 | return ret; | 732 | return ret; |
| 721 | } | 733 | } |
| 722 | 734 | ||
| @@ -727,8 +739,7 @@ static int cs4270_remove(struct platform_device *pdev) | |||
| 727 | snd_soc_free_pcms(socdev); | 739 | snd_soc_free_pcms(socdev); |
| 728 | 740 | ||
| 729 | #ifdef USE_I2C | 741 | #ifdef USE_I2C |
| 730 | if (socdev->codec->control_data) | 742 | i2c_del_driver(&cs4270_i2c_driver); |
| 731 | i2c_del_driver(&cs4270_i2c_driver); | ||
| 732 | #endif | 743 | #endif |
| 733 | 744 | ||
| 734 | kfree(socdev->codec); | 745 | kfree(socdev->codec); |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 5761164fe16d..e873414840c8 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
| @@ -583,7 +583,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
| 583 | 583 | ||
| 584 | /* out 4 */ | 584 | /* out 4 */ |
| 585 | {"Out4 Mux", "VREF", "VREF"}, | 585 | {"Out4 Mux", "VREF", "VREF"}, |
| 586 | {"Out4 Mux", "Capture ST", "Capture ST Mixer"}, | 586 | {"Out4 Mux", "Capture ST", "Playback Mixer"}, |
| 587 | {"Out4 Mux", "LOUT2", "LOUT2"}, | 587 | {"Out4 Mux", "LOUT2", "LOUT2"}, |
| 588 | {"Out 4", NULL, "Out4 Mux"}, | 588 | {"Out 4", NULL, "Out4 Mux"}, |
| 589 | {"OUT4", NULL, "Out 4"}, | 589 | {"OUT4", NULL, "Out 4"}, |
| @@ -607,7 +607,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
| 607 | /* Capture Right Mux */ | 607 | /* Capture Right Mux */ |
| 608 | {"Capture Right Mux", "PGA", "Right Capture Volume"}, | 608 | {"Capture Right Mux", "PGA", "Right Capture Volume"}, |
| 609 | {"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"}, | 609 | {"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"}, |
| 610 | {"Capture Right Mux", "Sidetone", "Capture ST Mixer"}, | 610 | {"Capture Right Mux", "Sidetone", "Playback Mixer"}, |
| 611 | 611 | ||
| 612 | /* Mono Capture mixer-mux */ | 612 | /* Mono Capture mixer-mux */ |
| 613 | {"Capture Right Mixer", "Stereo", "Capture Right Mux"}, | 613 | {"Capture Right Mixer", "Stereo", "Capture Right Mux"}, |
