Skip to content

Commit

Permalink
net: dsa: ocelot: unlock on error in vsc9959_qos_port_tas_set()
Browse files Browse the repository at this point in the history
This error path needs call mutex_unlock(&ocelot->tas_lock) before
returning.

Fixes: 2d800bc ("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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 7, 2023
1 parent 2f27d78 commit cad7526
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/dsa/ocelot/felix_vsc9959.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cad7526

Please sign in to comment.