net: fec: put child node on error path
Subsystems (3)
PATCH 1/1 net: fec: put child node on error path
Also decrement the reference count of child device on error path.
Fixes 3e782985cb3c ("net: ethernet: fec: Allow configuration of MDIO bus speed")
Signed-off-by Pan Bian <[email protected]>
--- drivers/net/ethernet/freescale/fec_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/fec_main.c +2 -1
@@ -2165,9 +2165,9 @@ static int fec_enet_mii_init(struct platform_device *pdev) fep->mii_bus->parent = &pdev->dev; err =of_mdiobus_register (fep->mii_bus, node); -of_node_put (node);if (err) goto err_out_free_mdiobus; +of_node_put (node); mii_cnt++;
@@ -2180,6 +2180,7 @@ static int fec_enet_mii_init(struct platform_device *pdev) err_out_free_mdiobus:mdiobus_free (fep->mii_bus); err_out: +of_node_put (node);return err; }
Signature · 1 line
2.17.1
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 7 lines · On Wed, 20 Jan 2021 04:20:37 -0800 you wrote:
Also decrement the reference count of child device on error path.
Fixes 3e782985cb3c ("net: ethernet: fec: Allow configuration of MDIO bus speed")Signed-off-by Pan Bian <[email protected]>--- drivers/net/ethernet/freescale/fec_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Here is the summary with links:
- net: fec: put child node on error path
https://git.kernel.org/netdev/net/c/0607a2cddb60
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html