diff options
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/pci_ops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/pci_ops.c b/src/devices/pci_ops.c index c6d85f284e..08792f209d 100644 --- a/src/devices/pci_ops.c +++ b/src/devices/pci_ops.c @@ -27,7 +27,13 @@ static struct bus *get_pbus(device_t dev) { - struct bus *pbus = dev->bus; + struct bus *pbus; + + if (!dev) + printk_alert("get_pbus: dev is NULL!\n"); + + pbus = dev->bus; + while(pbus && pbus->dev && !ops_pci_bus(pbus)) { if (pbus == pbus->dev->bus) { printk_alert("%s in endless loop looking for a parent " |