diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-07 12:51:10 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-07 12:51:10 +0300 |
commit | 141d3b1daacd11bdbd6fa74c2b163093e10d17ee (patch) | |
tree | 04c98496f16ad2fe34c0cf4f31fedf4fe558c017 /net/dsa | |
parent | c201c91799d687c0a6d8c3272950f51aad5ffebe (diff) | |
parent | e4880bc5dfb1f02b152e62a894b5c6f3e995b3cf (diff) | |
download | linux-141d3b1daacd11bdbd6fa74c2b163093e10d17ee.tar.xz |
Merge branch 'linus' into x86/apic, to resolve conflicts
Conflicts:
arch/x86/include/asm/x2apic.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/Makefile | 1 | ||||
-rw-r--r-- | net/dsa/dsa2.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/net/dsa/Makefile b/net/dsa/Makefile index fcce25da937c..3d3c74193d06 100644 --- a/net/dsa/Makefile +++ b/net/dsa/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # the core obj-$(CONFIG_NET_DSA) += dsa_core.o dsa_core-y += dsa.o dsa2.o legacy.o port.o slave.o switch.o 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; |