From: Shreyansh Jain Date: Thu, 25 Apr 2019 13:34:56 +0000 (+0530) Subject: net/dpaa2: fix loop increment X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3b93bed6b1d75b150b2b7e82ff90f476940d241b;p=dpdk.git net/dpaa2: fix loop increment Identified by LGTM, the loop was incorrectly incrementing a different variable and conditional on another. Fixes: fe2b986ac662 ("net/dpaa2: support generic flow") Suggested-by: Ferruh Yigit Signed-off-by: Shreyansh Jain --- diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c index 98f68139b6..9ef46d47ec 100644 --- a/drivers/net/dpaa2/dpaa2_flow.c +++ b/drivers/net/dpaa2/dpaa2_flow.c @@ -1734,7 +1734,7 @@ dpaa2_dev_verify_patterns(struct dpaa2_dev_priv *dev_priv, /* more than DPKG_MAX_NUM_OF_EXTRACTS. Verify this limitation too. */ for (i = 0; pattern[i].type != RTE_FLOW_ITEM_TYPE_END; i++) { for (j = 0; j < MAX_TCS + 1; j++) { - for (k = 0; k < DPKG_MAX_NUM_OF_EXTRACTS; j++) { + for (k = 0; k < DPKG_MAX_NUM_OF_EXTRACTS; k++) { if (dev_priv->pattern[j].pattern_type[k] == pattern[i].type) break; }