From: Andrew Lunn Date: Sun, 22 Jan 2017 21:16:45 +0000 (+0100) Subject: net: dsa: Fix inverted test for multiple CPU interface X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23e3d618e49eb560052fe59a3c9629d3650ba46e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: dsa: Fix inverted test for multiple CPU interface Remove the wrong !, otherwise we get false positives about having multiple CPU interfaces. Fixes: b22de490869d ("net: dsa: store CPU switch structure in the tree") Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 77cb78767f1d..1f3afeb673d6 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -225,7 +225,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent) continue; if (!strcmp(name, "cpu")) { - if (!dst->cpu_switch) { + if (dst->cpu_switch) { netdev_err(dst->master_netdev, "multiple cpu ports?!\n"); return -EINVAL;