mwl8k: don't forget to call pci_disable_device()
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 30 Nov 2009 17:13:34 +0000 (18:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Dec 2009 21:51:21 +0000 (16:51 -0500)
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>
drivers/net/wireless/mwl8k.c

index e59a926..76a6071 100644 (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 @@ err_iounmap:
 
 err_free_reg:
        pci_release_regions(pdev);
+
+err_disable_device:
        pci_disable_device(pdev);
 
        return rc;