net/mlx5e: Fix actions_match_supported() return
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Mar 2020 13:23:05 +0000 (16:23 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Mar 2020 06:18:49 +0000 (23:18 -0700)
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>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 901f88a886c8023e9e6107421c6f366c8f0dde38..c7ed468db3e02ec3303d6815a83136e023b09c32 100644 (file)
@@ -3057,7 +3057,7 @@ static bool actions_match_supported(struct mlx5e_priv *priv,
                         */
                        NL_SET_ERR_MSG_MOD(extack,
                                           "Can't offload mirroring with action ct");
-                       return -EOPNOTSUPP;
+                       return false;
                }
        } else {
                actions = flow->nic_attr->action;