Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290369
b: refs/heads/master
c: 3d86b93
h: refs/heads/master
i:
  290367: d9892f0
v: v3
  • Loading branch information
Tim Gardner authored and John W. Linville committed Feb 6, 2012
1 parent 21052e8 commit fbac6d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 885bd8eca6ac172e299750d99bd5c9fddbed89b9
refs/heads/master: 3d86b93064c7f18378a2008bab9608ca7d11bdbb
19 changes: 12 additions & 7 deletions trunk/drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1758,8 +1758,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
RT_ASSERT(false,
"Unable to obtain 32bit DMA for consistent allocations\n");
pci_disable_device(pdev);
return -ENOMEM;
err = -ENOMEM;
goto fail1;
}
}

Expand Down Expand Up @@ -1801,7 +1801,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
err = pci_request_regions(pdev, KBUILD_MODNAME);
if (err) {
RT_ASSERT(false, "Can't obtain PCI resources\n");
goto fail2;
goto fail1;
}

pmem_start = pci_resource_start(pdev, rtlpriv->cfg->bar_id);
Expand All @@ -1814,6 +1814,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
rtlpriv->cfg->bar_id, pmem_len);
if (rtlpriv->io.pci_mem_start == 0) {
RT_ASSERT(false, "Can't map PCI mem\n");
err = -ENOMEM;
goto fail2;
}

Expand All @@ -1830,8 +1831,10 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
pci_write_config_byte(pdev, 0x04, 0x07);

/* find adapter */
if (!_rtl_pci_find_adapter(pdev, hw))
if (!_rtl_pci_find_adapter(pdev, hw)) {
err = -ENODEV;
goto fail3;
}

/* Init IO handler */
_rtl_pci_io_handler_init(&pdev->dev, hw);
Expand All @@ -1841,6 +1844,7 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,

if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
err = -ENODEV;
goto fail3;
}

Expand Down Expand Up @@ -1885,7 +1889,6 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
return 0;

fail3:
pci_set_drvdata(pdev, NULL);
rtl_deinit_core(hw);
_rtl_pci_io_handler_release(hw);

Expand All @@ -1897,10 +1900,12 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
complete(&rtlpriv->firmware_loading_complete);

fail1:

if (hw)
ieee80211_free_hw(hw);
pci_set_drvdata(pdev, NULL);
pci_disable_device(pdev);

return -ENODEV;
return err;

}
EXPORT_SYMBOL(rtl_pci_probe);
Expand Down

0 comments on commit fbac6d6

Please sign in to comment.