diff mbox series

net: fec: put child node on error path

Message ID 20210120122037.83897-1-bianpan2016@163.com
State New
Headers show
Series net: fec: put child node on error path | expand

Commit Message

Pan Bian Jan. 20, 2021, 12:20 p.m. UTC
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 <bianpan2016@163.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 23, 2021, 3:30 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

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 <bianpan2016@163.com>

> ---

>  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
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 04f24c66cf36..55c28fbc5f9e 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -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;
 }