Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/693
-gerrit
commit 74cc92c58451be4592219e5e70b894484a1f761e Author: Stefan Reinauer reinauer@chromium.org Date: Wed May 11 15:57:07 2011 -0700
Don't try to compute I/O for empty sub buses.
I am not sure if the sub bus being 0 is a problem, or if the assumption there has to be at least one non empty link is just wrong. It certainly does not hurt to add a small consistency check in either case.
Change-Id: I098446deef96a8baae26a7ca1ddd96e626a06dc5 Signed-off-by: Stefan Reinauer reinauer@google.com --- src/devices/device_util.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/devices/device_util.c b/src/devices/device_util.c index 9081a36..84fb115 100644 --- a/src/devices/device_util.c +++ b/src/devices/device_util.c @@ -583,6 +583,8 @@ void search_bus_resources(struct bus *bus, unsigned long type_mask, if (subbus->link_num == IOINDEX_SUBTRACTIVE_LINK(res->index)) break; + if (!subbus) /* Why can subbus be NULL? */ + break; search_bus_resources(subbus, type_mask, type, search, gp); continue;