diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 9692a726f2ed..5390ff541658 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1585,7 +1585,8 @@ void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up) { const struct dsa_port *dp = dsa_to_port(ds, port); - phylink_mac_change(dp->pl, up); + if (dp->pl) + phylink_mac_change(dp->pl, up); } EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_change);