diff options
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 9bf4c27f3393..a80b46777a04 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1140,9 +1140,11 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent, struct net_device *master; struct net_device *slave_dev; struct dsa_slave_priv *p; + struct dsa_port *cpu_dp; int ret; - master = ds->dst->cpu_dp->netdev; + cpu_dp = ds->dst->cpu_dp; + master = cpu_dp->netdev; slave_dev = alloc_netdev(sizeof(struct dsa_slave_priv), name, NET_NAME_UNKNOWN, ether_setup); |