summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-02 16:34:57 -0700
committerJohn W. Linville <linville@tuxdriver.com>2009-09-08 16:31:04 -0400
commitdb6be53cbaf118fdad5bdca211a19ca5354c9462 (patch)
tree003f64adcfef4624fa9e691ab450338dd996a4f3 /drivers/net/wireless/ath
parent5c630ce7e6cb144a29fd5a993363f4928fb4b890 (diff)
downloadblackbird-obmc-linux-db6be53cbaf118fdad5bdca211a19ca5354c9462.tar.gz
blackbird-obmc-linux-db6be53cbaf118fdad5bdca211a19ca5354c9462.zip
ath9k: propagate ieee80211_alloc_hw() failure
The -ENOMEM was never being passed on failure. While at it use dev_err() as ahb does upon failure. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 685a8cebb468..17862ccc3400 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -160,8 +160,9 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
hw = ieee80211_alloc_hw(sizeof(struct ath_wiphy) +
sizeof(struct ath_softc), &ath9k_ops);
- if (hw == NULL) {
- printk(KERN_ERR "ath_pci: no memory for ieee80211_hw\n");
+ if (!hw) {
+ dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
+ ret = -ENOMEM;
goto bad2;
}
OpenPOWER on IntegriCloud