summaryrefslogtreecommitdiff
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-01-15 05:34:50 +0300
committerJakub Kicinski <kuba@kernel.org>2021-01-15 05:34:50 +0300
commit1d9f03c0a15fa01aa14fb295cbc1236403fceb0b (patch)
tree2161a4e17f383a14e1e235e2deed7142733aca9b /net/dsa/dsa2.c
parente4abfd88c78105069eef627e04ef9413746bab7b (diff)
parent146620506274bd24d52fb1c589110a30eed8240b (diff)
downloadlinux-1d9f03c0a15fa01aa14fb295cbc1236403fceb0b.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index fd343466df27..6f65ea0eef9f 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -412,9 +412,13 @@ static int dsa_port_devlink_setup(struct dsa_port *dp)
static void dsa_port_teardown(struct dsa_port *dp)
{
+ struct devlink_port *dlp = &dp->devlink_port;
+
if (!dp->setup)
return;
+ devlink_port_type_clear(dlp);
+
switch (dp->type) {
case DSA_PORT_TYPE_UNUSED:
break;