patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] raw/ifpga/base: dereference before null check
@ 2019-09-17 22:24 Tianfei zhang
  0 siblings, 0 replies; only message in thread
From: Tianfei zhang @ 2019-09-17 22:24 UTC (permalink / raw)
  To: dev; +Cc: Tianfei zhang, stable

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 <tianfei.zhang@intel.com>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 22:24 [dpdk-stable] [PATCH] raw/ifpga/base: dereference before null check Tianfei zhang

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox