device: ignore NONE devices behind bridge

Ignore NONE devices in dev_is_active_bridge that are commonly used to
indicate hotplug capable ports.

Tested on Lenovo T520:
The empty ExpressCard Slot is no longer marked as active bridge.

Change-Id: I23347270aaab17647023969091ce4bcdd41dd57a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32441
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 5c4f911..47df305 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -628,7 +628,7 @@
 
 /*
  * Returns true if the device is an enabled bridge that has at least
- * one enabled device on its secondary bus.
+ * one enabled device on its secondary bus that is not of type NONE.
  */
 bool dev_is_active_bridge(struct device *dev)
 {
@@ -643,6 +643,9 @@
 
 	for (link = dev->link_list; link; link = link->next) {
 		for (child = link->children; child; child = child->sibling) {
+			if (child->path.type == DEVICE_PATH_NONE)
+				continue;
+
 			if (child->enabled)
 				return 1;
 		}