X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fkni.c;h=45196859328e53d36a482ccae257a4804495323f;hb=f2fc83b40f06da6a6b2476005279ba52d4ce3c44;hp=e9262e0790b1c889ea6ebf12871d46defc448596;hpb=35b2d13fd6fdcbd191f2a30d74648faeb1186c65;p=dpdk.git diff --git a/examples/ip_pipeline/kni.c b/examples/ip_pipeline/kni.c index e9262e0790..4519685932 100644 --- a/examples/ip_pipeline/kni.c +++ b/examples/ip_pipeline/kni.c @@ -109,6 +109,7 @@ kni_create(const char *name, struct kni_params *params) struct rte_kni *k; const struct rte_pci_device *pci_dev; const struct rte_bus *bus = NULL; + int ret; /* Check input params */ if ((name == NULL) || @@ -123,7 +124,9 @@ kni_create(const char *name, struct kni_params *params) return NULL; /* Resource create */ - rte_eth_dev_info_get(link->port_id, &dev_info); + ret = rte_eth_dev_info_get(link->port_id, &dev_info); + if (ret != 0) + return NULL; memset(&kni_conf, 0, sizeof(kni_conf)); strlcpy(kni_conf.name, name, RTE_KNI_NAMESIZE);