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> Reviewed-on: http://review.coreboot.org/693 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
dfab0f69ae
commit
5807555f9a
|
@ -583,6 +583,8 @@ void search_bus_resources(struct bus *bus, unsigned long type_mask,
|
||||||
if (subbus->link_num
|
if (subbus->link_num
|
||||||
== IOINDEX_SUBTRACTIVE_LINK(res->index))
|
== IOINDEX_SUBTRACTIVE_LINK(res->index))
|
||||||
break;
|
break;
|
||||||
|
if (!subbus) /* Why can subbus be NULL? */
|
||||||
|
break;
|
||||||
search_bus_resources(subbus, type_mask, type,
|
search_bus_resources(subbus, type_mask, type,
|
||||||
search, gp);
|
search, gp);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue