summaryrefslogtreecommitdiff
path: root/drivers/net/failsafe/failsafe_eal.c
diff options
context:
space:
mode:
authorGaetan Rivet <gaetan.rivet@6wind.com>2018-02-01 11:59:30 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-02-05 16:29:35 +0100
commit9df324ad0895d8d41e020675a6abb020a84fe323 (patch)
tree95da564281b186d2d2438db98bb904ce2769d71c /drivers/net/failsafe/failsafe_eal.c
parente8df563bac263e55b7dd9d45a00417aa92ef66cb (diff)
downloaddpdk-next-eventdev-9df324ad0895d8d41e020675a6abb020a84fe323.zip
dpdk-next-eventdev-9df324ad0895d8d41e020675a6abb020a84fe323.tar.gz
dpdk-next-eventdev-9df324ad0895d8d41e020675a6abb020a84fe323.tar.xz
net/failsafe: fix error string after ownership call
Ownership API returns a negative value, strerror expects a valid errno value, thus positive. Coverity issue: 260401 Fixes: dcd0c9c32b8d ("net/failsafe: use ownership mechanism for slaves") Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Diffstat (limited to 'drivers/net/failsafe/failsafe_eal.c')
-rw-r--r--drivers/net/failsafe/failsafe_eal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index 8946bf6..c3d6731 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -79,9 +79,9 @@ fs_bus_init(struct rte_eth_dev *dev)
" %d named %s", i, da->name);
}
ret = rte_eth_dev_owner_set(pid, &PRIV(dev)->my_owner);
- if (ret) {
+ if (ret < 0) {
INFO("sub_device %d owner set failed (%s),"
- " will try again later", i, strerror(ret));
+ " will try again later", i, strerror(-ret));
continue;
} else if (strncmp(rte_eth_devices[pid].device->name, da->name,
strlen(da->name)) != 0) {