From 07d27b971bf369e2748efe0bbf34b7b20d932a21 Mon Sep 17 00:00:00 2001 From: Declan Doherty Date: Wed, 2 May 2018 16:59:40 +0100 Subject: [PATCH] net/ixgbe: fix probe with no devargs Initialise rte_ethdev_args parameters to zero to handle the case where no devargs are passed to the IXGBE PF on device probe, so that there is no invalid attempts to create representor ports. Coverity Issue: 277231 Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports") Signed-off-by: Declan Doherty Reviewed-by: Ferruh Yigit --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index e49319a14b..a05527a918 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1734,7 +1734,8 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, ð_da); if (retval) return retval; - } + } else + memset(ð_da, 0, sizeof(eth_da)); retval = rte_eth_dev_create(&pci_dev->device, pci_dev->device.name, sizeof(struct ixgbe_adapter), -- 2.20.1