net/kni: remove unnecessary null check
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 Apr 2017 13:51:29 +0000 (14:51 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
Coverity issue: 1419721
Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/kni/rte_eth_kni.c

index 8f90034..f688d91 100644 (file)
@@ -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);