summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-08-03 17:18:21 +0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-03 17:18:21 +0400
commita5d5a914770a81a1f775be2ee35b9fa8fd19d381 (patch)
treeed07597966e91e3903faf305d69a2c5e1d109b91 /drivers/net/wireless/rtlwifi
parentd5eab9152a3b4ce962c02ad0a0e4d0ec94aadd92 (diff)
parentf35291082294ca6737953bbe4e9491ede04ab822 (diff)
downloadlinux-a5d5a914770a81a1f775be2ee35b9fa8fd19d381.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 5efd57833489..56f12358389d 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn);
pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn);
- /*find bridge info */
- pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;
- for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {
- if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {
- pcipriv->ndis_adapter.pcibridge_vendor = tmp;
- RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
- ("Pci Bridge Vendor is found index: %d\n",
- tmp));
- break;
+ if (bridge_pdev) {
+ /*find bridge info if available */
+ pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;
+ for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {
+ if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {
+ pcipriv->ndis_adapter.pcibridge_vendor = tmp;
+ RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
+ ("Pci Bridge Vendor is found index:"
+ " %d\n", tmp));
+ break;
+ }
}
}