examples/kni: check PCI info not NULL before reading
authorTomasz Duszynski <tdu@semihalf.com>
Mon, 16 Oct 2017 11:45:47 +0000 (13:45 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 24 Oct 2017 22:03:20 +0000 (00:03 +0200)
commit1e02d735c1446705592ca8d89b4b500f9492a8ef
treecaf15b98025592b6802b88fadaf9a4e9083759bc
parent96b5077cfaf95cd38dc7644e39036ad94e6435c8
examples/kni: check PCI info not NULL before reading

Since virtual devices, i.e mrvl net pmd, do not touch pci_dev
dereferencing it will cause segmentation fault as by default
it's set to NULL in rte_eth_dev_info_get().

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
examples/kni/main.c