diff options
author | Jonathan Bither <jonbither@gmail.com> | 2012-04-12 07:03:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-13 14:05:36 -0400 |
commit | 2db0d2ba97801fb57c91e99b9e22b2a24c32d3d7 (patch) | |
tree | 779bfee646cf6c74c17ef3359576ce54b9611a98 /drivers/net/wireless/ath | |
parent | 32b92f4f3f261697a49f944e31920dbcbbd4ad01 (diff) |
ath5k: unmap io memory on probe failure
Signed-off-by: Jonathan Bither <jonbither@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ahb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c index 47b6c35077d6..8c50d9d19d78 100644 --- a/drivers/net/wireless/ath/ath5k/ahb.c +++ b/drivers/net/wireless/ath/ath5k/ahb.c | |||
@@ -120,7 +120,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
120 | if (res == NULL) { | 120 | if (res == NULL) { |
121 | dev_err(&pdev->dev, "no IRQ resource found\n"); | 121 | dev_err(&pdev->dev, "no IRQ resource found\n"); |
122 | ret = -ENXIO; | 122 | ret = -ENXIO; |
123 | goto err_out; | 123 | goto err_iounmap; |
124 | } | 124 | } |
125 | 125 | ||
126 | irq = res->start; | 126 | irq = res->start; |
@@ -129,7 +129,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
129 | if (hw == NULL) { | 129 | if (hw == NULL) { |
130 | dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); | 130 | dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); |
131 | ret = -ENOMEM; | 131 | ret = -ENOMEM; |
132 | goto err_out; | 132 | goto err_iounmap; |
133 | } | 133 | } |
134 | 134 | ||
135 | ah = hw->priv; | 135 | ah = hw->priv; |
@@ -186,6 +186,8 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
186 | err_free_hw: | 186 | err_free_hw: |
187 | ieee80211_free_hw(hw); | 187 | ieee80211_free_hw(hw); |
188 | platform_set_drvdata(pdev, NULL); | 188 | platform_set_drvdata(pdev, NULL); |
189 | err_iounmap: | ||
190 | iounmap(mem); | ||
189 | err_out: | 191 | err_out: |
190 | return ret; | 192 | return ret; |
191 | } | 193 | } |