From: Yong Wang Date: Tue, 10 Oct 2017 11:24:20 +0000 (-0400) Subject: net/i40e: fix uninitialized variable X-Git-Tag: spdx-start~1468 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=47cf8373a1792b4a2c49cc03994f479fd4a693a2;p=dpdk.git net/i40e: fix uninitialized variable In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in func call i40evf_dev_atomic_write_link_status(), but is uninitialized. Fixes: 2a73125b7041 ("i40evf: fix link info update") Cc: stable@dpdk.org Signed-off-by: Yong Wang Acked-by: Jingjing Wu --- diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 111ac397b3..b2e5aa6937 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2100,6 +2100,8 @@ i40evf_dev_link_update(struct rte_eth_dev *dev, new_link.link_duplex = ETH_LINK_FULL_DUPLEX; new_link.link_status = vf->link_up ? ETH_LINK_UP : ETH_LINK_DOWN; + new_link.link_autoneg = + dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED; i40evf_dev_atomic_write_link_status(dev, &new_link);