Commit 99c3563e authored by Linus Torvalds's avatar Linus Torvalds

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
parents 022d5bcd 24918b61
...@@ -1683,8 +1683,8 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = { ...@@ -1683,8 +1683,8 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
/* Dell 3 stack systems with verb table in BIOS */ /* Dell 3 stack systems with verb table in BIOS */
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell ", STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_3ST),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS),
......
...@@ -681,7 +681,7 @@ static int cs4270_probe(struct platform_device *pdev) ...@@ -681,7 +681,7 @@ static int cs4270_probe(struct platform_device *pdev)
ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "cs4270: failed to create PCMs\n"); printk(KERN_ERR "cs4270: failed to create PCMs\n");
return ret; goto error_free_codec;
} }
#ifdef USE_I2C #ifdef USE_I2C
...@@ -690,8 +690,7 @@ static int cs4270_probe(struct platform_device *pdev) ...@@ -690,8 +690,7 @@ static int cs4270_probe(struct platform_device *pdev)
ret = i2c_add_driver(&cs4270_i2c_driver); ret = i2c_add_driver(&cs4270_i2c_driver);
if (ret) { if (ret) {
printk(KERN_ERR "cs4270: failed to attach driver"); printk(KERN_ERR "cs4270: failed to attach driver");
snd_soc_free_pcms(socdev); goto error_free_pcms;
return ret;
} }
/* Did we find a CS4270 on the I2C bus? */ /* Did we find a CS4270 on the I2C bus? */
...@@ -713,10 +712,23 @@ static int cs4270_probe(struct platform_device *pdev) ...@@ -713,10 +712,23 @@ static int cs4270_probe(struct platform_device *pdev)
ret = snd_soc_register_card(socdev); ret = snd_soc_register_card(socdev);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "cs4270: failed to register card\n"); printk(KERN_ERR "cs4270: failed to register card\n");
snd_soc_free_pcms(socdev); goto error_del_driver;
return ret;
} }
return 0;
error_del_driver:
#ifdef USE_I2C
i2c_del_driver(&cs4270_i2c_driver);
error_free_pcms:
#endif
snd_soc_free_pcms(socdev);
error_free_codec:
kfree(socdev->codec);
socdev->codec = NULL;
return ret; return ret;
} }
...@@ -727,8 +739,7 @@ static int cs4270_remove(struct platform_device *pdev) ...@@ -727,8 +739,7 @@ static int cs4270_remove(struct platform_device *pdev)
snd_soc_free_pcms(socdev); snd_soc_free_pcms(socdev);
#ifdef USE_I2C #ifdef USE_I2C
if (socdev->codec->control_data) i2c_del_driver(&cs4270_i2c_driver);
i2c_del_driver(&cs4270_i2c_driver);
#endif #endif
kfree(socdev->codec); kfree(socdev->codec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment