From dc5026b485b0f13d4d3c1406368719e3478f36b6 Mon Sep 17 00:00:00 2001 From: Intel Date: Wed, 18 Sep 2013 12:00:00 +0200 Subject: [PATCH] ethdev: allow device without registered driver It is needed for non-pci devices (ring and pcap). Signed-off-by: Intel --- lib/librte_ether/rte_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.20.1