From: Tianfei Zhang Date: Tue, 17 Sep 2019 22:24:59 +0000 (+0800) Subject: raw/ifpga/base: fix dereference before null check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=79e9ae58bf6f8dd41ceebb43947f675ef97df521;p=dpdk.git raw/ifpga/base: fix dereference before null check Add pointer null check before dereference. Coverity issue: 344976 Fixes: 12f92a513a13 ("raw/ifpga/base: fix retimer link status") Cc: stable@dpdk.org Signed-off-by: Tianfei Zhang Reviewed-by: Xiaolong Ye --- diff --git a/drivers/raw/ifpga/base/opae_eth_group.c b/drivers/raw/ifpga/base/opae_eth_group.c index d189dd5781..be28954e05 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); }