diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-01-15 05:34:50 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-15 05:34:50 +0300 |
commit | 1d9f03c0a15fa01aa14fb295cbc1236403fceb0b (patch) | |
tree | 2161a4e17f383a14e1e235e2deed7142733aca9b /net/dsa/dsa2.c | |
parent | e4abfd88c78105069eef627e04ef9413746bab7b (diff) | |
parent | 146620506274bd24d52fb1c589110a30eed8240b (diff) | |
download | linux-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.c | 4 |
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; |