aboutsummaryrefslogtreecommitdiff
path: root/src/devices/pci_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pci_ops.c')
-rw-r--r--src/devices/pci_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/pci_ops.c b/src/devices/pci_ops.c
index ed07564f61..6029d757ef 100644
--- a/src/devices/pci_ops.c
+++ b/src/devices/pci_ops.c
@@ -27,24 +27,24 @@
static struct bus *get_pbus(device_t dev)
{
- struct bus *pbus;
+ struct bus *pbus = NULL;
if (!dev)
die("get_pbus: dev is NULL!\n");
-
- pbus = dev->bus;
+ else
+ 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 "
- "bus with ops_pci_bus for %s, breaking out\n",
+ "bus with ops_pci_bus for %s, breaking out.\n",
__func__, dev_path(dev));
break;
}
pbus = pbus->dev->bus;
}
if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_pci_bus) {
- printk_emerg("%s Cannot find pci bus operations\n", dev_path(dev));
+ printk_emerg("%s: Cannot find pci bus operations.\n", dev_path(dev));
die("");
}
return pbus;