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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




[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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux