net/i40e/base: fix potentially uninitialized variables
authorRobin Zhang <robinx.zhang@intel.com>
Sat, 9 Oct 2021 01:39:50 +0000 (01:39 +0000)
committerQi Zhang <qi.z.zhang@intel.com>
Sat, 9 Oct 2021 05:37:05 +0000 (07:37 +0200)
commitbc99971d1021ecc85280b9b98e84c9b5f4ba008e
tree06b347f4a8746464704fe92916e02a1f848bc2d6
parentbd3c90715b1913b99b9857067fa76985b7fb9224
net/i40e/base: fix potentially uninitialized variables

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Cc: stable@dpdk.org
Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/base/i40e_adminq.c