net/liquidio: fix uninitialized variable
authorYong Wang <wang.yong19@zte.com.cn>
Fri, 15 Sep 2017 11:48:28 +0000 (07:48 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:48 +0000 (02:49 +0200)
In func lio_dev_link_update(), "link.link_autoneg" is used in func call
lio_dev_atomic_write_link_status(), but it is uninitialized.

Fixes: 3766020513df ("net/liquidio: add APIs to start device and update link")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
drivers/net/liquidio/lio_ethdev.c

index a17fba5..a3c8e67 100644 (file)
@@ -974,6 +974,7 @@ lio_dev_link_update(struct rte_eth_dev *eth_dev,
        link.link_status = ETH_LINK_DOWN;
        link.link_speed = ETH_SPEED_NUM_NONE;
        link.link_duplex = ETH_LINK_HALF_DUPLEX;
+       link.link_autoneg = ETH_LINK_AUTONEG;
        memset(&old, 0, sizeof(old));
 
        /* Return what we found */