From: Ivan Ilchenko Date: Thu, 12 Sep 2019 16:42:27 +0000 (+0100) Subject: net/softnic: check status of getting ethdev info X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=062d35f81433b669a128f643bbee265b5496ff5c;p=dpdk.git net/softnic: 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/softnic according to its new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/softnic/rte_eth_softnic_link.c b/drivers/net/softnic/rte_eth_softnic_link.c index d669913a4d..21a64069f6 100644 --- a/drivers/net/softnic/rte_eth_softnic_link.c +++ b/drivers/net/softnic/rte_eth_softnic_link.c @@ -57,6 +57,7 @@ softnic_link_create(struct pmd_internals *p, struct rte_eth_dev_info port_info; struct softnic_link *link; uint16_t port_id; + int ret; /* Check input params */ if (name == NULL || @@ -78,7 +79,9 @@ softnic_link_create(struct pmd_internals *p, return NULL; } - rte_eth_dev_info_get(port_id, &port_info); + ret = rte_eth_dev_info_get(port_id, &port_info); + if (ret != 0) + return NULL; /* Node allocation */ link = calloc(1, sizeof(struct softnic_link));