From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value Date: Mon, 30 Apr 2018 16:32:57 +0100 Message-ID: <20180430153258.1101-2-declan.doherty@intel.com> References: <20180430153258.1101-1-declan.doherty@intel.com> Cc: Declan Doherty To: dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B248F1C01 for ; Mon, 30 Apr 2018 17:41:07 +0200 (CEST) In-Reply-To: <20180430153258.1101-1-declan.doherty@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Initialise rte_ethdev_args nb_representor_ports 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 --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 0ccf55dc8..283dd7e49 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1725,8 +1725,7 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_device *pci_dev) { char name[RTE_ETH_NAME_MAX_LEN]; - - struct rte_eth_devargs eth_da; + struct rte_eth_devargs eth_da = { .nb_representor_ports = 0 }; int i, retval; if (pci_dev->device.devargs) { -- 2.14.3