summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dsa/slave.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 528380a3e296..da64ba9d825d 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -555,6 +555,9 @@ static void dsa_slave_phy_setup(struct dsa_slave_priv *p,
*/
if (!p->phy) {
p->phy = ds->slave_mii_bus->phy_map[p->port];
+ if (!p->phy)
+ return;
+
phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link,
p->phy_interface);
} else {