diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-08 12:17:15 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-08 12:17:15 +0300 |
commit | 8a103df440afea30c91ebd42e61dc644e647f4bd (patch) | |
tree | 2cfa99e9c6e1e138e1404bce4294e46cb0034cce /net/dsa/dsa2.c | |
parent | a9903f04e0a4ea522d959c2f287cdf0ab029e324 (diff) | |
parent | fbc3edf7d7731d7a22c483c679700589bab936a3 (diff) | |
download | linux-8a103df440afea30c91ebd42e61dc644e647f4bd.tar.xz |
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r-- | net/dsa/dsa2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 873af0108e24..045d8a176279 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -496,14 +496,15 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index, if (!ethernet) return -EINVAL; ethernet_dev = of_find_net_device_by_node(ethernet); + if (!ethernet_dev) + return -EPROBE_DEFER; } else { ethernet_dev = dsa_dev_to_net_device(ds->cd->netdev[index]); + if (!ethernet_dev) + return -EPROBE_DEFER; dev_put(ethernet_dev); } - if (!ethernet_dev) - return -EPROBE_DEFER; - if (!dst->cpu_dp) { dst->cpu_dp = port; dst->cpu_dp->netdev = ethernet_dev; |