From 4d933dd2d686879e0c27839d3f9046e348580da8 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 21 Jul 2009 21:36:41 +0000 Subject: Rewrite interrupt handling in coreboot to be more comprehensible and more flexible. Also some minore device allocator cleanups that sneaked in. Signed-off-by: Stefan Reinauer Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4452 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/pci_ops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/devices/pci_ops.c') 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; -- cgit v1.2.3