Commit 86d59226 authored by Dan Carpenter's avatar Dan Carpenter Committed by Saeed Mahameed

net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get()

Preserve the error code if esw_add_restore_rule() fails.  Don't return
success.

Fixes: 67027828 ("net/mlx5e: TC, Set CT miss to the specific ct action instance")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 04ad04e4
......@@ -5736,8 +5736,10 @@ int mlx5e_tc_action_miss_mapping_get(struct mlx5e_priv *priv, struct mlx5_flow_a
esw = priv->mdev->priv.eswitch;
attr->act_id_restore_rule = esw_add_restore_rule(esw, *act_miss_mapping);
if (IS_ERR(attr->act_id_restore_rule))
if (IS_ERR(attr->act_id_restore_rule)) {
err = PTR_ERR(attr->act_id_restore_rule);
goto err_rule;
}
return 0;
......
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