From: Yevgeny Kliteynik <klit...@nvidia.com>

mlx5dr_rule_create returns -ret, so internal functions should return
rte_errno on failure. Fix return values of the function that creates
rule in root table.

Signed-off-by: Yevgeny Kliteynik <klit...@nvidia.com>
Acked-by: Matan Azrad <ma...@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_rule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c 
b/drivers/net/mlx5/hws/mlx5dr_rule.c
index f14e1e6ecd..7bcf2de55f 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -733,7 +733,7 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
 free_attr:
        simple_free(attr);
 
-       return -rte_errno;
+       return rte_errno;
 }
 
 static int mlx5dr_rule_destroy_root(struct mlx5dr_rule *rule,
-- 
2.39.3

Reply via email to