Commit d792e5f7 authored by Dan Carpenter's avatar Dan Carpenter Committed by Saeed Mahameed

net/mlx5e: Fix error codes in alloc_branch_attr()

Set the error code if set_branch_dest_ft() fails.

Fixes: ccbe3300 ("net/mlx5e: TC, Don't offload post action rule if not supported")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 86d59226
......@@ -3778,7 +3778,8 @@ alloc_branch_attr(struct mlx5e_tc_flow *flow,
break;
case FLOW_ACTION_ACCEPT:
case FLOW_ACTION_PIPE:
if (set_branch_dest_ft(flow->priv, attr))
err = set_branch_dest_ft(flow->priv, attr);
if (err)
goto out_err;
break;
case FLOW_ACTION_JUMP:
......@@ -3788,7 +3789,8 @@ alloc_branch_attr(struct mlx5e_tc_flow *flow,
goto out_err;
}
*jump_count = cond->extval;
if (set_branch_dest_ft(flow->priv, attr))
err = set_branch_dest_ft(flow->priv, attr);
if (err)
goto out_err;
break;
default:
......
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