From: Ferruh Yigit Date: Tue, 11 Apr 2017 13:51:29 +0000 (+0100) Subject: net/kni: remove unnecessary null check X-Git-Tag: spdx-start~3540 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3a89f00b7d4fe6ead963a97eb01cc5ede2a8f477;p=dpdk.git net/kni: remove unnecessary null check Coverity issue: 1419721 Fixes: 75e2bc54c018 ("net/kni: add KNI PMD") Signed-off-by: Ferruh Yigit --- diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 8f900342cf..f688d91928 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -486,12 +486,10 @@ eth_kni_remove(struct rte_vdev_device *vdev) eth_kni_dev_stop(eth_dev); - if (eth_dev->data) { - internals = eth_dev->data->dev_private; - rte_kni_release(internals->kni); + internals = eth_dev->data->dev_private; + rte_kni_release(internals->kni); - rte_free(internals); - } + rte_free(internals); rte_free(eth_dev->data); rte_eth_dev_release_port(eth_dev);