From: Ivan Ilchenko Date: Thu, 12 Sep 2019 16:42:25 +0000 (+0100) Subject: net/failsafe: check status of getting ethdev info X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2cd1221470eee9064535282a429d770a7b157479;p=dpdk.git net/failsafe: check status of getting ethdev info 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 Signed-off-by: Andrew Rybchenko Acked-by: Gaetan Rivet --- diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 96e05d4dc4..c52958a3f8 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -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); }