Thread (20 messages) 20 messages, 5 authors, 2016-07-07

[PATCH 5/7] net: ethernet: bgmac: Add platform device support

From: f.fainelli@gmail.com (Florian Fainelli)
Date: 2016-06-30 23:28:09
Also in: linux-devicetree, lkml, netdev

[snip]

+
+	return 0;
+
+err2:
+	devm_iounmap(&pdev->dev, bgmac->plat.idm_base);
+err1:
+	devm_iounmap(&pdev->dev, bgmac->plat.base);
+err:
+	devm_kfree(&pdev->dev, bgmac);

This is not needed actually, now that you use the device managed helper
functions.
+
+	return rc;
+}
+
+static int bgmac_remove(struct platform_device *pdev)
+{
+	struct bgmac *bgmac = platform_get_drvdata(pdev);
+
+	bgmac_enet_remove(bgmac);
+	devm_iounmap(&pdev->dev, bgmac->plat.idm_base);
+	devm_iounmap(&pdev->dev, bgmac->plat.base);
+	devm_kfree(&pdev->dev, bgmac);
Same here.
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help