git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0474b9
)
net/kni: fix return value check
author
Ferruh Yigit
<ferruh.yigit@intel.com>
Tue, 23 Apr 2019 15:36:21 +0000
(16:36 +0100)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Fri, 3 May 2019 16:45:23 +0000
(18:45 +0200)
'rte_kni_release()' return value is not checked, adding it.
Coverity issue: 336837
Fixes:
75e2bc54c018
("net/kni: add KNI PMD")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/kni/rte_eth_kni.c
patch
|
blob
|
history
diff --git
a/drivers/net/kni/rte_eth_kni.c
b/drivers/net/kni/rte_eth_kni.c
index
89f4473
..
1f232e4
100644
(file)
--- a/
drivers/net/kni/rte_eth_kni.c
+++ b/
drivers/net/kni/rte_eth_kni.c
@@
-459,6
+459,7
@@
eth_kni_remove(struct rte_vdev_device *vdev)
struct rte_eth_dev *eth_dev;
struct pmd_internals *internals;
const char *name;
+ int ret;
name = rte_vdev_device_name(vdev);
PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name);
@@
-477,7
+478,9
@@
eth_kni_remove(struct rte_vdev_device *vdev)
eth_kni_dev_stop(eth_dev);
internals = eth_dev->data->dev_private;
- rte_kni_release(internals->kni);
+ ret = rte_kni_release(internals->kni);
+ if (ret)
+ PMD_LOG(WARNING, "Not able to release kni for %s", name);
rte_eth_dev_release_port(eth_dev);