From b853efa574b4823be7c3bfb9bffae92c93433dd3 Mon Sep 17 00:00:00 2001 From: Jingjing Wu Date: Tue, 30 Jan 2018 11:32:58 +0800 Subject: [PATCH] net/avf: fix uninitialized variables This patch fixes the coverity UNINIT issue. Coverity issue: 257016, 257036 Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Reported-by: John McNamara Signed-off-by: Jingjing Wu --- drivers/net/avf/avf_ethdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c index 3f210b2fcc..4df661705a 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; @@ -763,10 +763,10 @@ avf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask) err = avf_enable_vlan_strip(adapter); else err = avf_disable_vlan_strip(adapter); - } - if (err) - return -EIO; + if (err) + return -EIO; + } return 0; } -- 2.20.1