ethdev: allow device without registered driver

It is needed for non-pci devices (ring and pcap).

Signed-off-by: Intel
This commit is contained in:
Intel 2013-09-18 12:00:00 +02:00 committed by Thomas Monjalon
parent 0b33b68d12
commit dc5026b485

View File

@ -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