diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-03-23 10:52:56 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-23 10:53:49 -0700 |
commit | 89695196f0ba78a17453f9616355f2ca6b293402 (patch) | |
tree | 7a0f44d06e5b83002899667841baa9a3598bf819 /net/dsa | |
parent | 764f4eb6846f5475f1244767d24d25dd86528a4a (diff) | |
parent | f92fcb5c00dc924a4661d5bf68de7937040f26b8 (diff) | |
download | linux-89695196f0ba78a17453f9616355f2ca6b293402.tar.gz linux-89695196f0ba78a17453f9616355f2ca6b293402.tar.bz2 linux-89695196f0ba78a17453f9616355f2ca6b293402.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in overtime fixes, no conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/dsa2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 47b334226f4e..ca6af86964bc 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -1786,6 +1786,10 @@ void dsa_switch_shutdown(struct dsa_switch *ds) struct dsa_port *dp; mutex_lock(&dsa2_mutex); + + if (!ds->setup) + goto out; + rtnl_lock(); dsa_switch_for_each_user_port(dp, ds) { @@ -1802,6 +1806,7 @@ void dsa_switch_shutdown(struct dsa_switch *ds) dp->master->dsa_ptr = NULL; rtnl_unlock(); +out: mutex_unlock(&dsa2_mutex); } EXPORT_SYMBOL_GPL(dsa_switch_shutdown); |