From: Xueming Li Date: Fri, 13 Apr 2018 15:00:36 +0000 (+0800) Subject: net/mlx5: fix invalid flow item check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2323cc3c2e68bad29cc25d3924dbe4c55d358499;p=dpdk.git net/mlx5: fix invalid flow item check This patch fixed invalid flow item check. Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values") Signed-off-by: Xueming Li Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 1ca413e325..97ff8fcfad 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -826,8 +826,10 @@ mlx5_flow_convert_items_validate(const struct rte_flow_item items[], break; } } - if (!token) + if (!token) { + ret = -ENOTSUP; goto exit_item_not_supported; + } cur_item = token; ret = mlx5_flow_item_validate(items, (const uint8_t *)cur_item->mask,