Commit 3f4c38df authored by Yevgeny Kliteynik's avatar Yevgeny Kliteynik Committed by Jakub Kicinski

net/mlx5: HWS, fixed error flow return values of some functions

Fixed all the '-ret' returns in error flow of functions to 'ret',
as the internal functions are already returning negative error values
(e.g. -EINVAL)
Signed-off-by: default avatarYevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20240911201757.1505453-3-saeed@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e2e9ddf8
......@@ -967,7 +967,7 @@ int mlx5hws_matcher_attach_at(struct mlx5hws_matcher *matcher,
ret = hws_matcher_check_and_process_at(matcher, at);
if (ret)
return -ret;
return ret;
required_stes = at->num_of_action_stes - (!is_jumbo || at->only_term);
if (matcher->action_ste[MLX5HWS_ACTION_STE_IDX_ANY].max_stes < required_stes) {
......
......@@ -751,11 +751,11 @@ int mlx5hws_rule_destroy(struct mlx5hws_rule *rule,
ret = hws_rule_enqueue_precheck(rule, attr);
if (unlikely(ret))
return -ret;
return ret;
ret = hws_rule_destroy_hws(rule, attr);
return -ret;
return ret;
}
int mlx5hws_rule_action_update(struct mlx5hws_rule *rule,
......@@ -767,7 +767,7 @@ int mlx5hws_rule_action_update(struct mlx5hws_rule *rule,
ret = hws_rule_enqueue_precheck_update(rule, attr);
if (unlikely(ret))
return -ret;
return ret;
ret = hws_rule_create_hws(rule,
attr,
......@@ -776,5 +776,5 @@ int mlx5hws_rule_action_update(struct mlx5hws_rule *rule,
at_idx,
rule_actions);
return -ret;
return ret;
}
......@@ -489,5 +489,5 @@ int mlx5hws_table_set_default_miss(struct mlx5hws_table *tbl,
return 0;
out:
mutex_unlock(&ctx->ctrl_lock);
return -ret;
return ret;
}
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