Skip to content

Commit

Permalink
net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_re…
Browse files Browse the repository at this point in the history
…gister_mdio_mux()

commit 1a15267 upstream.

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

Fixes: 634db83 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220428095716.540452-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Yang Yingliang authored and gregkh committed May 12, 2022
1 parent 8c70373 commit 1043a3c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
Expand Up @@ -916,6 +916,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;
}

Expand Down

0 comments on commit 1043a3c

Please sign in to comment.