diff options
| author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2025-04-15 00:30:20 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-25 10:47:46 +0200 |
| commit | a3e4b6ad5f9a869036429702f0d8c2d832547aae (patch) | |
| tree | 2835d5bbe0ca8d60ecd1d2141cb7569c03b503cb /net | |
| parent | 5c8066fbdb9653c6e9a224bdcd8f9c91a484f0de (diff) | |
| download | linux-a3e4b6ad5f9a869036429702f0d8c2d832547aae.tar.gz linux-a3e4b6ad5f9a869036429702f0d8c2d832547aae.tar.bz2 linux-a3e4b6ad5f9a869036429702f0d8c2d832547aae.zip | |
net: dsa: avoid refcount warnings when ds->ops->tag_8021q_vlan_del() fails
[ Upstream commit 514eff7b0aa1c5eb645ddbb8676ef3e2d88a8b99 ]
This is very similar to the problem and solution from commit
232deb3f9567 ("net: dsa: avoid refcount warnings when
->port_{fdb,mdb}_del returns error"), except for the
dsa_port_do_tag_8021q_vlan_del() operation.
Fixes: c64b9c05045a ("net: dsa: tag_8021q: add proper cross-chip notifier support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250414213020.2959021-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/dsa/tag_8021q.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index 3ee53e28ec2e..53e03fd8071b 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -197,7 +197,7 @@ static int dsa_port_do_tag_8021q_vlan_del(struct dsa_port *dp, u16 vid) err = ds->ops->tag_8021q_vlan_del(ds, port, vid); if (err) { - refcount_inc(&v->refcount); + refcount_set(&v->refcount, 1); return err; } |
