Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2db0d2ba authored by Jonathan Bither's avatar Jonathan Bither Committed by John W. Linville
Browse files

ath5k: unmap io memory on probe failure

parent 32b92f4f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
	if (res == NULL) {
		dev_err(&pdev->dev, "no IRQ resource found\n");
		ret = -ENXIO;
		goto err_out;
		goto err_iounmap;
	}

	irq = res->start;
@@ -129,7 +129,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
	if (hw == NULL) {
		dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
		ret = -ENOMEM;
		goto err_out;
		goto err_iounmap;
	}

	ah = hw->priv;
@@ -186,6 +186,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
 err_free_hw:
	ieee80211_free_hw(hw);
	platform_set_drvdata(pdev, NULL);
 err_iounmap:
        iounmap(mem);
 err_out:
	return ret;
}