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>
This commit is contained in:

committed by
John W. Linville

parent
db6be53cba
commit
580171f7cd
@@ -120,16 +120,14 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
||||
sc->irq = irq;
|
||||
|
||||
ret = ath_init_device(AR5416_AR9100_DEVID, sc);
|
||||
if (ret != 0) {
|
||||
dev_err(&pdev->dev, "failed to attach device, err=%d\n", ret);
|
||||
ret = -ENODEV;
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize device\n");
|
||||
goto err_free_hw;
|
||||
}
|
||||
|
||||
ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "request_irq failed, err=%d\n", ret);
|
||||
ret = -EIO;
|
||||
dev_err(&pdev->dev, "request_irq failed\n");
|
||||
goto err_detach;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user