X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fpci%2Fpcxhr%2Fpcxhr.c;h=7d2b136295d5304249aef42362dbf7f148487973;hb=55fa518867978e1f5fd8353098f80d125ac734d7;hp=58621206a2b3a69881cdbff074d55215eaae55ad;hpb=bb1f24bf00a85f666b56a09b7cdbfd221af16c2c;p=linux-2.6-omap-h63xx.git diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 58621206a2b..7d2b136295d 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -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;