Commit cad7526f authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: 2d800bc5 ("net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2f27d789
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment