diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:40:52 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:40:52 +0200 |
| commit | c03fb16bafdfc42a158d0f35a0472128a7d2ff57 (patch) | |
| tree | 567025edab3e53e0bf76bb67a5bd4dadbc50a171 /net/dsa/dsa2.c | |
| parent | 660a92a59b9e831a0407e41ff62875656d30006e (diff) | |
| parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
Merge 5.15-rc6 into usb-next
We need the usb fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/dsa/dsa2.c')
| -rw-r--r-- | net/dsa/dsa2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index b29262eee00b..da18094b5a04 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -170,7 +170,7 @@ void dsa_bridge_num_put(const struct net_device *bridge_dev, int bridge_num) /* Check if the bridge is still in use, otherwise it is time * to clean it up so we can reuse this bridge_num later. */ - if (!dsa_bridge_num_find(bridge_dev)) + if (dsa_bridge_num_find(bridge_dev) < 0) clear_bit(bridge_num, &dsa_fwd_offloading_bridges); } @@ -811,7 +811,9 @@ static int dsa_switch_setup_tag_protocol(struct dsa_switch *ds) if (!dsa_is_cpu_port(ds, port)) continue; + rtnl_lock(); err = ds->ops->change_tag_protocol(ds, port, tag_ops->proto); + rtnl_unlock(); if (err) { dev_err(ds->dev, "Unable to use tag protocol \"%s\": %pe\n", tag_ops->name, ERR_PTR(err)); |
