This patch fixes the coverity UNINIT issue.
Coverity issue: 257016, 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>
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;
err = avf_enable_vlan_strip(adapter);
else
err = avf_disable_vlan_strip(adapter);
- }
- if (err)
- return -EIO;
+ if (err)
+ return -EIO;
+ }
return 0;
}