summaryrefslogtreecommitdiff
path: root/drivers/net/netvsc/hn_ethdev.c
diff options
context:
space:
mode:
authorIgor Romanov <igor.romanov@oktetlabs.ru>2019-09-10 10:02:16 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-07 15:00:55 +0200
commitfd2d28fcb579330760eeb658521543093eb216fb (patch)
tree35cdc2199956684be4cf6cb3511e94b83495c48f /drivers/net/netvsc/hn_ethdev.c
parent70febdcfd60f278be598ec9bcf1ff5bb5c5a59a8 (diff)
downloaddpdk-fd2d28fcb579330760eeb658521543093eb216fb.zip
dpdk-fd2d28fcb579330760eeb658521543093eb216fb.tar.gz
dpdk-fd2d28fcb579330760eeb658521543093eb216fb.tar.xz
ethdev: change owner delete function to return int
Change rte_eth_dev_owner_delete() return value from void to int and return negative errno values in case of error conditions. Right now there is only one error case for rte_eth_dev_owner_delete() - invalid owner, but it still makes sense to return error to catch bugs in the code which uses the function. Also update the usage of the function in drivers/netvsc according to the new return type. Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'drivers/net/netvsc/hn_ethdev.c')
-rw-r--r--drivers/net/netvsc/hn_ethdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 7edfe5e..89c769c 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1004,6 +1004,7 @@ static int
eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
{
struct hn_data *hv = eth_dev->data->dev_private;
+ int ret;
PMD_INIT_FUNC_TRACE();
@@ -1021,7 +1022,9 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
hn_tx_pool_uninit(eth_dev);
rte_vmbus_chan_close(hv->primary->chan);
rte_free(hv->primary);
- rte_eth_dev_owner_delete(hv->owner.id);
+ ret = rte_eth_dev_owner_delete(hv->owner.id);
+ if (ret != 0)
+ return ret;
return 0;
}