Skip to contentSkip to conversation

net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()

PATCH Applied Yang Yingliang 2 participants 2 messages Apr 28, 2022 – Apr 30, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()

The node pointer returned by of_get_child_by_name() with refcount incremented, so add of_node_put() after using it.

Fixes 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -0
index f86cc83003f2..f834472599f7 100644
@@ -907,6 +907,7 @@ static int sun8i_dwmac_register_mdio_mux(struct stmmac_priv *priv)
 
 	ret = mdio_mux_init(priv->device, mdio_mux, mdio_mux_syscon_switch_fn,
 			    &gmac->mux_handle, priv, priv->mii);
+	of_node_put(mdio_mux);
 	return ret;
 }
 
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Thu, 28 Apr 2022 17:57:16 +0800 you wrote:

The node pointer returned by of_get_child_by_name() with refcount incremented, so add of_node_put() after using it.

Fixes 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")

[...]

Here is the summary with links:
- net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()

    https://git.kernel.org/netdev/net/c/1a15267b7be7

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html