Skip to content

Commit

Permalink
mwl8k: don't forget to call pci_disable_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Dec 7, 2009
1 parent 89b872e commit 3db95e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3db95e5

Please sign in to comment.