summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/rtl8366.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-09-19 00:29:54 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-20 14:10:58 -0700
commit3dfe8dde093a07e82fa472c0f8c29a7f6a2006a5 (patch)
treebe7e1c274cc8be594a503ec36024ccd90e35d15b /drivers/net/dsa/rtl8366.c
parentdd92f1798981a9d7241d788dd478aea3460b09a1 (diff)
net: dsa: rtl8366: Skip PVID setting if not requested
We go to lengths to determine whether the PVID should be set for this port or not, and then fail to take it into account. Fix this oversight. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/rtl8366.c')
-rw-r--r--drivers/net/dsa/rtl8366.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c
index 2dcde7a91721..7c09ed747bc0 100644
--- a/drivers/net/dsa/rtl8366.c
+++ b/drivers/net/dsa/rtl8366.c
@@ -436,6 +436,9 @@ void rtl8366_vlan_add(struct dsa_switch *ds, int port,
"failed to set up VLAN %04x",
vid);
+ if (!pvid)
+ continue;
+
ret = rtl8366_set_pvid(smi, port, vid);
if (ret)
dev_err(smi->dev,