net/failsafe: check status of getting ethdev info
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Thu, 12 Sep 2019 16:42:25 +0000 (17:42 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 12:45:35 +0000 (14:45 +0200)
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/failsafe according to its new return type.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_ops.c

index 96e05d4..c52958a 100644 (file)
@@ -866,6 +866,7 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 {
        struct sub_device *sdev;
        uint8_t i;
+       int ret;
 
        /* Use maximum upper bounds by default */
        infos->max_rx_pktlen = UINT32_MAX;
@@ -933,7 +934,10 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
        FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {
                struct rte_eth_dev_info sub_info;
 
-               rte_eth_dev_info_get(PORT_ID(sdev), &sub_info);
+               ret = rte_eth_dev_info_get(PORT_ID(sdev), &sub_info);
+               ret = fs_err(sdev, ret);
+               if (ret != 0)
+                       return;
 
                fs_dev_merge_info(infos, &sub_info);
        }