Skip to content

Commit 3f4c38d

Browse files
kliteynkuba-moo
authored andcommitted
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: Yevgeny Kliteynik <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e2e9ddf commit 3f4c38d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ int mlx5hws_matcher_attach_at(struct mlx5hws_matcher *matcher,
967967

968968
ret = hws_matcher_check_and_process_at(matcher, at);
969969
if (ret)
970-
return -ret;
970+
return ret;
971971

972972
required_stes = at->num_of_action_stes - (!is_jumbo || at->only_term);
973973
if (matcher->action_ste[MLX5HWS_ACTION_STE_IDX_ANY].max_stes < required_stes) {

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_rule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,11 @@ int mlx5hws_rule_destroy(struct mlx5hws_rule *rule,
751751

752752
ret = hws_rule_enqueue_precheck(rule, attr);
753753
if (unlikely(ret))
754-
return -ret;
754+
return ret;
755755

756756
ret = hws_rule_destroy_hws(rule, attr);
757757

758-
return -ret;
758+
return ret;
759759
}
760760

761761
int mlx5hws_rule_action_update(struct mlx5hws_rule *rule,
@@ -767,7 +767,7 @@ int mlx5hws_rule_action_update(struct mlx5hws_rule *rule,
767767

768768
ret = hws_rule_enqueue_precheck_update(rule, attr);
769769
if (unlikely(ret))
770-
return -ret;
770+
return ret;
771771

772772
ret = hws_rule_create_hws(rule,
773773
attr,
@@ -776,5 +776,5 @@ int mlx5hws_rule_action_update(struct mlx5hws_rule *rule,
776776
at_idx,
777777
rule_actions);
778778

779-
return -ret;
779+
return ret;
780780
}

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,5 +489,5 @@ int mlx5hws_table_set_default_miss(struct mlx5hws_table *tbl,
489489
return 0;
490490
out:
491491
mutex_unlock(&ctx->ctrl_lock);
492-
return -ret;
492+
return ret;
493493
}

0 commit comments

Comments
 (0)