vlib: pci: set pci driver name to none when no driver is loaded 44/22544/2
authorBenoît Ganne <bganne@cisco.com>
Fri, 4 Oct 2019 15:30:21 +0000 (17:30 +0200)
committerDamjan Marion <dmarion@me.com>
Sat, 5 Oct 2019 11:44:50 +0000 (11:44 +0000)
commit0eae2bb1f1199f7dcb6a8c62b1ea612ed9ee4ae1
tree1382a29d9663406a5db38bff1773c50843f63187
parent66a332cf199fc97cae61aac913d98b9b51dc3a22
vlib: pci: set pci driver name to none when no driver is loaded

If no Linux PCI driver module is loaded, then the driver_name in the PCI
info struct is NULL. This can triggers crash when checking driver name
eg. in vlib_pci_device_open().
Default to "<NONE>" as driver name, which should never match.

Type: fix

Change-Id: I9e69889a7566467bd8220b92bbbaa72ada957257
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vlib/linux/pci.c