Skip to content

Commit

Permalink
ath9k: remove a bogus WARN_ON
Browse files Browse the repository at this point in the history
On embedded hardware it's normal to not have a PCI device for the PCI
bridge that the wifi card is attached to. pdev->bus->self will be
NULL in that case. In that case, simply return without emitting an
useless kernel stack trace.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Aug 24, 2011
1 parent d069a46 commit 292121d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath9k/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void ath_pci_aspm_init(struct ath_common *common)
* Both upstream and downstream PCIe components should
* have the same ASPM settings.
*/
if (WARN_ON(!parent))
if (!parent)
return;

pos = pci_pcie_cap(parent);
Expand All @@ -137,7 +137,7 @@ static void ath_pci_aspm_init(struct ath_common *common)
return;
}

if (WARN_ON(!parent))
if (!parent)
return;

pos = pci_pcie_cap(parent);
Expand Down

0 comments on commit 292121d

Please sign in to comment.