]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - sound/pci/pcxhr/pcxhr.c
Merge branch 'topic/pcsp-fix' into topic/misc
[linux-2.6.git] / sound / pci / pcxhr / pcxhr.c
index 58621206a2b3a69881cdbff074d55215eaae55ad..7d2b136295d5304249aef42362dbf7f148487973 100644 (file)
@@ -1230,8 +1230,11 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
                return -ENOMEM;
        }
 
-       if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST))
+       if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST)) {
+               kfree(mgr);
+               pci_disable_device(pci);
                return -ENODEV;
+       }
        card_name = pcxhr_board_params[pci_id->driver_data].board_name;
        mgr->playback_chips = pcxhr_board_params[pci_id->driver_data].playback_chips;
        mgr->capture_chips  = pcxhr_board_params[pci_id->driver_data].capture_chips;