net/bnxt: fix flow check for null spec and mask
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 20 Nov 2019 03:00:23 +0000 (19:00 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:06 +0000 (17:36 +0100)
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 <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
drivers/net/bnxt/bnxt_flow.c

index 5af5714..76e9584 100644 (file)
@@ -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 =