From c20d3f1ff89046dd60235ef89ddcac40c3f1fb2a Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Wed, 24 Aug 2011 14:08:41 -0400 Subject: [PATCH] --- yaml --- r: 265693 b: refs/heads/master c: 22c55e6e7ed46ad3734c206d90b5ccba3b318d22 h: refs/heads/master i: 265691: ddf47a880165e0e1530e278b85232f242620b539 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath9k/pci.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index f0cc420dc0d1..f032d09d7621 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ea5a08cfa5fe9d10333eb7d65a7158ab766dae93 +refs/heads/master: 22c55e6e7ed46ad3734c206d90b5ccba3b318d22 diff --git a/trunk/drivers/net/wireless/ath/ath9k/pci.c b/trunk/drivers/net/wireless/ath/ath9k/pci.c index d704c8d9bae7..91c2e64de799 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/pci.c +++ b/trunk/drivers/net/wireless/ath/ath9k/pci.c @@ -115,6 +115,8 @@ static void ath_pci_aspm_init(struct ath_common *common) return; parent = pdev->bus->self; + if (!parent) + return; if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) { /* Bluetooth coexistance requires disabling ASPM. */ @@ -126,9 +128,6 @@ static void ath_pci_aspm_init(struct ath_common *common) * Both upstream and downstream PCIe components should * have the same ASPM settings. */ - if (!parent) - return; - pos = pci_pcie_cap(parent); pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); @@ -137,9 +136,6 @@ static void ath_pci_aspm_init(struct ath_common *common) return; } - if (!parent) - return; - pos = pci_pcie_cap(parent); pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) {