From: Intel Date: Wed, 18 Sep 2013 10:00:00 +0000 (+0200) Subject: ethdev: allow device without registered driver X-Git-Tag: spdx-start~11138 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dc5026b485b0f13d4d3c1406368719e3478f36b6;p=dpdk.git ethdev: allow device without registered driver It is needed for non-pci devices (ring and pcap). Signed-off-by: Intel --- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 419281186f..0d342845ec 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1037,7 +1037,8 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info) FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); (*dev->dev_ops->dev_infos_get)(dev, dev_info); dev_info->pci_dev = dev->pci_dev; - dev_info->driver_name = dev->driver->pci_drv.name; + if (dev->driver) + dev_info->driver_name = dev->driver->pci_drv.name; } void