The non-leaf validation in iavf_node_param_check() unconditionally
rejects a non-NULL wfq_weight_mode pointer at the top of the block.
The else-if clause below re-tests the same pointer, which is guaranteed
NULL at that point, making the branch unreachable dead code.

Remove the dead else-if block. No functional change.

Fixes: 44d0a720a538 ("net/iavf: query QoS capabilities and set queue TC 
mapping")
Cc: [email protected]
Cc: [email protected]

Signed-off-by: Sergei Iashin <[email protected]>
---
 drivers/net/intel/iavf/iavf_tm.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_tm.c b/drivers/net/intel/iavf/iavf_tm.c
index 1d12196ba6..efdbb45b62 100644
--- a/drivers/net/intel/iavf/iavf_tm.c
+++ b/drivers/net/intel/iavf/iavf_tm.c
@@ -178,12 +178,6 @@ iavf_node_param_check(struct iavf_info *vf, uint32_t 
node_id,
                                RTE_TM_ERROR_TYPE_NODE_PARAMS_N_SP_PRIORITIES;
                        error->message = "SP priority not supported";
                        return -EINVAL;
-               } else if (params->nonleaf.wfq_weight_mode &&
-                          !(*params->nonleaf.wfq_weight_mode)) {
-                       error->type =
-                               RTE_TM_ERROR_TYPE_NODE_PARAMS_WFQ_WEIGHT_MODE;
-                       error->message = "WFP should be byte mode";
-                       return -EINVAL;
                }
 
                return 0;
-- 
2.39.5

Reply via email to