diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-30 12:38:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-30 12:38:42 -0400 |
commit | 99c3563e64cf887cca0b181149c0f85c39569276 (patch) | |
tree | 7606b3e31fb18c9ad10685624ff3a3c052b8eb0e | |
parent | 022d5bcd49e0b3c3a3fde60491837414f96cc20e (diff) | |
parent | 24918b61b55c21e09a3e07cd82e1b3a8154782dc (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Fix model for Dell Inspiron 1525
ALSA: ASoC: Fix cs4270 error path
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/cs4270.c | 25 |
2 files changed, 19 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ad994fcab725..f3da621f25c5 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1683,8 +1683,8 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = { | |||
1683 | /* Dell 3 stack systems with verb table in BIOS */ | 1683 | /* Dell 3 stack systems with verb table in BIOS */ |
1684 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), | 1684 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), |
1685 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), | 1685 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), |
1686 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell ", STAC_DELL_BIOS), | ||
1687 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), | 1686 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), |
1687 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_3ST), | ||
1688 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), | 1688 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), |
1689 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), | 1689 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), |
1690 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), | 1690 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), |
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); |