Commit 22c55e6e authored by John W. Linville's avatar John W. Linville

ath9k: remove replicated null check in ath_pci_aspm_init

Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ea5a08cf
...@@ -115,6 +115,8 @@ static void ath_pci_aspm_init(struct ath_common *common) ...@@ -115,6 +115,8 @@ static void ath_pci_aspm_init(struct ath_common *common)
return; return;
parent = pdev->bus->self; parent = pdev->bus->self;
if (!parent)
return;
if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) { if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) {
/* Bluetooth coexistance requires disabling ASPM. */ /* Bluetooth coexistance requires disabling ASPM. */
...@@ -126,9 +128,6 @@ static void ath_pci_aspm_init(struct ath_common *common) ...@@ -126,9 +128,6 @@ static void ath_pci_aspm_init(struct ath_common *common)
* Both upstream and downstream PCIe components should * Both upstream and downstream PCIe components should
* have the same ASPM settings. * have the same ASPM settings.
*/ */
if (!parent)
return;
pos = pci_pcie_cap(parent); pos = pci_pcie_cap(parent);
pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm);
aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
...@@ -137,9 +136,6 @@ static void ath_pci_aspm_init(struct ath_common *common) ...@@ -137,9 +136,6 @@ static void ath_pci_aspm_init(struct ath_common *common)
return; return;
} }
if (!parent)
return;
pos = pci_pcie_cap(parent); pos = pci_pcie_cap(parent);
pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm); pci_read_config_byte(parent, pos + PCI_EXP_LNKCTL, &aspm);
if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment