diff --git a/net/dsa/port.c b/net/dsa/port.c index 1a40c52f5a42dc..4368fd32c4a503 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1240,8 +1240,10 @@ int dsa_port_link_register_of(struct dsa_port *dp) if (ds->ops->phylink_mac_link_down) ds->ops->phylink_mac_link_down(ds, port, MLO_AN_FIXED, PHY_INTERFACE_MODE_NA); + of_node_put(phy_np); return dsa_port_phylink_register(dp); } + of_node_put(phy_np); return 0; }