From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D82848DB5 for ; Fri, 6 Nov 2015 18:20:09 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 06 Nov 2015 09:20:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,252,1444719600"; d="scan'208";a="813538219" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 06 Nov 2015 09:20:07 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id tA6HK6CV010423; Fri, 6 Nov 2015 17:20:06 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id tA6HK6oQ012921; Fri, 6 Nov 2015 17:20:06 GMT Received: (from bairemon@localhost) by sivswdev01.ir.intel.com with id tA6HK6sE012917; Fri, 6 Nov 2015 17:20:06 GMT From: Bernard Iremonger To: dev@dpdk.org Date: Fri, 6 Nov 2015 17:20:01 +0000 Message-Id: <1446830401-12862-2-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1446830401-12862-1-git-send-email-bernard.iremonger@intel.com> References: <1446830401-12862-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [v2 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 17:20:10 -0000 add return statement to if branch Dereferencing NULL pointer reported by Coverity, CID 119256. Dereferencing NULL pointer reported by Coverity, CID 119257. Signed-off-by: Bernard Iremonger --- lib/librte_ether/rte_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index e0e1dca..1b73f29 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3276,6 +3276,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, struct rte_pci_device *pci_de if ((eth_dev == NULL) || (pci_dev == NULL)) { PMD_DEBUG_TRACE("NULL pointer eth_dev=%p pci_dev=%p\n", eth_dev, pci_dev); + return; } eth_dev->data->dev_flags = 0; -- 1.9.1