提交 23e3d618 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: dsa: Fix inverted test for multiple CPU interface

Remove the wrong !, otherwise we get false positives about having
multiple CPU interfaces.

Fixes: b22de490 ("net: dsa: store CPU switch structure in the tree")
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6db6f0ea
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册