mwl8k: don't forget to call pci_disable_device()

Don't forget to call pci_disable_device() if pci_request_regions()
fails during probe.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Lennert Buytenhek 2009-11-30 18:13:34 +01:00 committed by John W. Linville
parent 89b872e2e4
commit 3db95e50c8

View File

@ -3378,7 +3378,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
if (rc) {
printk(KERN_ERR "%s: Cannot obtain PCI resources\n",
MWL8K_NAME);
return rc;
goto err_disable_device;
}
pci_set_master(pdev);
@ -3609,6 +3609,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
err_free_reg:
pci_release_regions(pdev);
err_disable_device:
pci_disable_device(pdev);
return rc;