From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3B575A2EFC for ; Tue, 17 Sep 2019 16:38:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B52B1BFBB; Tue, 17 Sep 2019 16:38:48 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id EAAB81BF28; Tue, 17 Sep 2019 16:38:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2019 07:38:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,516,1559545200"; d="scan'208";a="186161955" Received: from figo-optiplex-9020.sh.intel.com ([10.238.169.51]) by fmsmga008.fm.intel.com with ESMTP; 17 Sep 2019 07:38:44 -0700 From: Tianfei zhang To: dev@dpdk.org Cc: Tianfei zhang , stable@dpdk.org Date: Wed, 18 Sep 2019 06:24:59 +0800 Message-Id: <20190917222459.19097-1-tianfei.zhang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] raw/ifpga/base: dereference before null check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add pointer null check before dereference. Coverity issue: 344976 Fixes: 12f92a51 ("raw/ifpga/base: fix retimer link status") Cc: stable@dpdk.org Signed-off-by: Tianfei zhang --- drivers/raw/ifpga/base/opae_eth_group.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/raw/ifpga/base/opae_eth_group.c b/drivers/raw/ifpga/base/opae_eth_group.c index d189dd578..be28954e0 100644 --- a/drivers/raw/ifpga/base/opae_eth_group.c +++ b/drivers/raw/ifpga/base/opae_eth_group.c @@ -308,9 +308,8 @@ struct eth_group_device *eth_group_probe(void *base) void eth_group_release(struct eth_group_device *dev) { - eth_group_hw_uinit(dev); - if (dev) { + eth_group_hw_uinit(dev); dev->status = ETH_GROUP_DEV_NOUSED; opae_free(dev); } -- 2.17.1