From 3a89f00b7d4fe6ead963a97eb01cc5ede2a8f477 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 11 Apr 2017 14:51:29 +0100 Subject: [PATCH] net/kni: remove unnecessary null check Coverity issue: 1419721 Fixes: 75e2bc54c018 ("net/kni: add KNI PMD") Signed-off-by: Ferruh Yigit --- drivers/net/kni/rte_eth_kni.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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); -- 2.20.1