From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 20 Mar 2020 16:23:05 +0300
Subject: net/mlx5e: Fix actions_match_supported() return
Patch-mainline: v5.7-rc1
Git-commit: 49397b801261160fb5f5d3f28536c792e72ecbb3
References: jsc#SLE-15172
The actions_match_supported() function returns a bool, true for success
and false for failure. This error path is returning a negative which
is cast to true but it should return false.
Fixes: 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -3058,7 +3058,7 @@ static bool actions_match_supported(stru
*/
NL_SET_ERR_MSG_MOD(extack,
"Can't offload mirroring with action ct");
- return -EOPNOTSUPP;
+ return false;
}
} else {
actions = flow->nic_attr->action;