net/mlx5: fix invalid flow item check

This patch fixed invalid flow item check.

Fixes: a6d83b6a92 ("net/mlx5: standardize on negative errno values")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
This commit is contained in:
Xueming Li 2018-04-13 23:00:36 +08:00 committed by Ferruh Yigit
parent 96525b9e19
commit 2323cc3c2e

View File

@ -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,