mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 15:13:52 +00:00
ath5k: unmap io memory on probe failure
Signed-off-by: Jonathan Bither <jonbither@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
32b92f4f3f
commit
2db0d2ba97
@ -120,7 +120,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
|||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
dev_err(&pdev->dev, "no IRQ resource found\n");
|
dev_err(&pdev->dev, "no IRQ resource found\n");
|
||||||
ret = -ENXIO;
|
ret = -ENXIO;
|
||||||
goto err_out;
|
goto err_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = res->start;
|
irq = res->start;
|
||||||
@ -129,7 +129,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
|||||||
if (hw == NULL) {
|
if (hw == NULL) {
|
||||||
dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
|
dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_out;
|
goto err_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
ah = hw->priv;
|
ah = hw->priv;
|
||||||
@ -186,6 +186,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
|
|||||||
err_free_hw:
|
err_free_hw:
|
||||||
ieee80211_free_hw(hw);
|
ieee80211_free_hw(hw);
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
|
err_iounmap:
|
||||||
|
iounmap(mem);
|
||||||
err_out:
|
err_out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user