[dpdk-dev] net/avf: fix uninitialized variables issue

Message ID 1517282310-18067-1-git-send-email-jingjing.wu@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jingjing Wu Jan. 30, 2018, 3:18 a.m. UTC
  This patch fixes the coverity UNINIT issue.

Coverity issue: 257036
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/avf/avf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index cf7bbb2..58380a7 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -191,7 +191,7 @@  avf_init_rss(struct avf_adapter *adapter)
 				   vf->vf_res->rss_key_size));
 
 	/* init RSS LUT table */
-	for (i = 0; i < vf->vf_res->rss_lut_size; i++, j++) {
+	for (i = 0, j = 0; i < vf->vf_res->rss_lut_size; i++, j++) {
 		if (j >= nb_q)
 			j = 0;
 		vf->rss_lut[i] = j;