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

Commit 1f8f1e89 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by David S. Miller
Browse files

net: fs_enet: Fix an error handling path



'of_node_put(fpi->phy_node)' should also be called if we branch to
'out_deregister_fixed_link' error handling path.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3d8103b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1045,10 +1045,10 @@ static int fs_enet_probe(struct platform_device *ofdev)
out_free_dev:
	free_netdev(ndev);
out_put:
	of_node_put(fpi->phy_node);
	if (fpi->clk_per)
		clk_disable_unprepare(fpi->clk_per);
out_deregister_fixed_link:
	of_node_put(fpi->phy_node);
	if (of_phy_is_fixed_link(ofdev->dev.of_node))
		of_phy_deregister_fixed_link(ofdev->dev.of_node);
out_free_fpi: