net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux()
Subsystems (5)
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")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +1 -0
@@ -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
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 addof_node_put()after using it.Fixes 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>[...]
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