diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-03 00:02:18 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-08 20:31:04 (GMT) |
commit | 580171f7cd08687cdf1b263aabb35608b3c37433 (patch) | |
tree | f11b817d537e100df257256cb6937d9b73640d33 /drivers/net/wireless/ath/ath9k/pci.c | |
parent | db6be53cbaf118fdad5bdca211a19ca5354c9462 (diff) | |
download | linux-fsl-qoriq-580171f7cd08687cdf1b263aabb35608b3c37433.tar.xz |
ath9k: propagate errors on ath_init_device() and request_irq()
We've cleaned up ath_init_device() and its children enough
to pass meaninful errors back from probe. When this fails
it means our device could not be initialized and a meaninful
error will have been passed.
Do the same for request_irq() and also synchronize the error
messages while at it.
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/ath9k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 17862cc..bc4bc2c 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -179,17 +179,17 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) sc->mem = mem; sc->bus_ops = &ath_pci_bus_ops; - if (ath_init_device(id->device, sc) != 0) { - ret = -ENODEV; + ret = ath_init_device(id->device, sc); + if (ret) { + dev_err(&pdev->dev, "failed to initialize device\n"); goto bad3; } /* setup interrupt service routine */ - if (request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath", sc)) { - printk(KERN_ERR "%s: request_irq failed\n", - wiphy_name(hw->wiphy)); - ret = -EIO; + ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath", sc); + if (ret) { + dev_err(&pdev->dev, "request_irq failed\n"); goto bad4; } |