summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device/device.c b/src/device/device.c
index 1b4255bffe..17cd8f4ab8 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -340,6 +340,9 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
resource_t base;
base = round(bridge->base, bridge->align);
+ if (!bus)
+ return;
+
printk(BIOS_SPEW, "%s %s: base: %llx size: %llx align: %d gran: %d"
" limit: %llx\n", dev_path(bus->dev), resource2str(bridge),
base, bridge->size, bridge->align,
@@ -484,6 +487,9 @@ static void allocate_resources(struct bus *bus, struct resource *bridge,
resource_t base;
base = bridge->base;
+ if (!bus)
+ return;
+
printk(BIOS_SPEW, "%s %s: base:%llx size:%llx align:%d gran:%d "
"limit:%llx\n", dev_path(bus->dev),
resource2str(bridge),