From: Ivan Ilchenko <ivan.ilche...@oktetlabs.ru>

rte_eth_dev_info_get() return value was changed from void to int,
so this patch modify rte_eth_dev_info_get() usage across
net/netvsc according to its new return type.

Signed-off-by: Ivan Ilchenko <ivan.ilche...@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
---
 drivers/net/netvsc/hn_vf.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 03f855b..b6b1e5d 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -176,8 +176,16 @@ static void hn_vf_info_merge(struct rte_eth_dev *vf_dev,
                             struct rte_eth_dev_info *info)
 {
        struct rte_eth_dev_info vf_info;
+       int ret;
+
+       ret = rte_eth_dev_info_get(vf_dev->data->port_id, &vf_info);
+       if (ret != 0) {
+               PMD_DRV_LOG(ERR,
+                       "Error during getting device (port %u) info: %s\n",
+                       vf_dev->data->port_id, strerror(-ret));
 
-       rte_eth_dev_info_get(vf_dev->data->port_id, &vf_info);
+               return;
+       }
 
        info->speed_capa = vf_info.speed_capa;
        info->default_rxportconf = vf_info.default_rxportconf;
-- 
1.8.3.1

Reply via email to