Impact: Prevent some hard lock due to pxe detection
In some cases, we can't find the associated PCI device.
In such situation, we shouldn't try to display its properties as
pci_device is set to NULL.
struct s_pxe *p = &hardware->pxe;
more_printf(" PCI device no: %d \n", p->pci_device_pos);
- if (hardware->pci_ids_return_code == -ENOPCIIDS) {
+ if ((hardware->pci_ids_return_code == -ENOPCIIDS) || (p->pci_device==NULL)) {
snprintf(buffer, sizeof(buffer),
" PCI ID : %04x:%04x[%04x:%04X] rev(%02x)\n",
p->vendor_id, p->product_id, p->subvendor_id,
struct s_pxe *p = &hardware->pxe;
- if (hardware->pci_ids_return_code == -ENOPCIIDS) {
+ if ((hardware->pci_ids_return_code == -ENOPCIIDS) || (p->pci_device==NULL)) {
snprintf(buffer, sizeof buffer, "PCI Vendor : %d",
p->vendor_id);
snprintf(infobar, sizeof infobar, "PCI Vendor : %d",