diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-06-06 11:24:37 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-06-07 12:10:52 +0300 |
commit | cad7526f33ce1e7d387d1d0568a089e41deec5c2 (patch) | |
tree | f88daa23df5dc1181860d1ab6030970e262cb25c /drivers/net/dsa/ocelot/felix_vsc9959.c | |
parent | 2f27d7890f53a9da696277e1993acd7eb6ca6d66 (diff) | |
download | linux-cad7526f33ce1e7d387d1d0568a089e41deec5c2.tar.xz |
net: dsa: ocelot: unlock on error in vsc9959_qos_port_tas_set()
This error path needs call mutex_unlock(&ocelot->tas_lock) before
returning.
Fixes: 2d800bc500fb ("net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix_vsc9959.c')
-rw-r--r-- | drivers/net/dsa/ocelot/felix_vsc9959.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 5de6a27052fc..903532ea9fa4 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1424,7 +1424,8 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port, mutex_unlock(&ocelot->tas_lock); return 0; } else if (taprio->cmd != TAPRIO_CMD_REPLACE) { - return -EOPNOTSUPP; + ret = -EOPNOTSUPP; + goto err_unlock; } ret = ocelot_port_mqprio(ocelot, port, &taprio->mqprio); |