From: Ajit Khaparde Date: Wed, 20 Nov 2019 03:00:23 +0000 (-0800) Subject: net/bnxt: fix flow check for null spec and mask X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fb4921ab4cb7238a22160ac61280ad647a3dcc6c;p=dpdk.git net/bnxt: fix flow check for null spec and mask bnxt_validate_and_parse_flow_type already has protocol specific NULL checks for rte_flow_item spec and mask and take actions accordingly. A check at the top of the loop is redundant and is preventing the protocol specific checks from being executed. Fixes: b7e01f386059 ("net/bnxt: handle cleanup if flow creation fails") Signed-off-by: Ajit Khaparde Reviewed-by: Santoshkumar Karanappa Rastapur Reviewed-by: Somnath Kotur --- diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 5af5714485..76e9584da7 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -177,14 +177,6 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, return -rte_errno; } - if (!item->spec || !item->mask) { - rte_flow_error_set(error, EINVAL, - RTE_FLOW_ERROR_TYPE_ITEM, - item, - "spec/mask is NULL"); - return -rte_errno; - } - switch (item->type) { case RTE_FLOW_ITEM_TYPE_ANY: inner =