From: Felix Fietkau Date: Sat, 13 Aug 2011 16:13:49 +0000 (-0600) Subject: ath9k: remove a bogus WARN_ON X-Git-Tag: v3.2-rc1~129^2~353^2^2~50 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=292121dce2af63dab371102097a887de7cf24233;p=~emulex%2Finfiniband.git ath9k: remove a bogus WARN_ON 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 8bd8e85ece4..d704c8d9bae 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -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); @@ -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);