summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath5k/attach.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-12-02 10:27:06 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-12-02 15:17:50 -0500
commit8efa5d7d6ad307ae2d220def37ca89594062c40d (patch)
treec56eac029c47751932a9b7c5a1432b53fbae3361 /drivers/net/wireless/ath/ath5k/attach.c
parent4aa5d783c9e1c72e4950ff34f388077ccecac74a (diff)
ath5k: Check if pci pdev struct is initialized in common functions.
To be able to support other busses than PCI check if pci device structure is initialized. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/attach.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/attach.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index a84782a63e0a..86f6fec069e8 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -273,7 +273,7 @@ int ath5k_hw_init(struct ath5k_softc *sc)
/*
* Write PCI-E power save settings
*/
- if ((ah->ah_version == AR5K_AR5212) && (pdev->is_pcie)) {
+ if ((ah->ah_version == AR5K_AR5212) && pdev && (pdev->is_pcie)) {
ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES);
ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES);
@@ -305,8 +305,7 @@ int ath5k_hw_init(struct ath5k_softc *sc)
/* Get misc capabilities */
ret = ath5k_hw_set_capabilities(ah);
if (ret) {
- ATH5K_ERR(sc, "unable to get device capabilities: 0x%04x\n",
- sc->pdev->device);
+ ATH5K_ERR(sc, "unable to get device capabilities\n");
goto err;
}