From: Yong Wang Date: Tue, 19 Sep 2017 03:17:24 +0000 (-0400) Subject: net/ixgbe: fix uninitialized variable X-Git-Tag: spdx-start~1449 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=457ea93fda4ee8e0ea08a862e89a1fbdf0121d9c;p=dpdk.git net/ixgbe: fix uninitialized variable In func ixgbe_dev_link_update(), "link.link_autoneg" is used in func call rte_ixgbe_dev_atomic_write_link_status(), but is uninitialized. Fixes: 82113036e4e5 ("ethdev: redesign link speed config") Cc: stable@dpdk.org Signed-off-by: Yong Wang Acked-by: Wenzhuo Lu --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index a0588ab962..a08e475fde 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3956,6 +3956,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, link.link_status = ETH_LINK_DOWN; link.link_speed = 0; link.link_duplex = ETH_LINK_HALF_DUPLEX; + link.link_autoneg = ETH_LINK_AUTONEG; memset(&old, 0, sizeof(old)); rte_ixgbe_dev_atomic_read_link_status(dev, &old);