aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/dsa/switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 2b1b21bde830..8f8ed8248c2c 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -266,7 +266,7 @@ static int dsa_port_do_mdb_del(struct dsa_port *dp,
err = ds->ops->port_mdb_del(ds, port, mdb);
if (err) {
- refcount_inc(&a->refcount);
+ refcount_set(&a->refcount, 1);
return err;
}
@@ -333,7 +333,7 @@ static int dsa_port_do_fdb_del(struct dsa_port *dp, const unsigned char *addr,
err = ds->ops->port_fdb_del(ds, port, addr, vid);
if (err) {
- refcount_inc(&a->refcount);
+ refcount_set(&a->refcount, 1);
return err;
}