- Minor bugfixes


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1215 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index 326f343..ba57bc8 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -14,6 +14,7 @@
 	first = *old_devices;
 	last = first;
 	while(last && last->sibling && 
+		(last->sibling->path.type == DEVICE_PATH_PCI) &&
 		(last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
 		last = last->sibling;
 	}
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index 031d855..ffa4207 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -475,6 +475,10 @@
 {
 	struct device *dev = 0;
 	for(; *list; list = &(*list)->sibling) {
+		if ((*list)->path.type != DEVICE_PATH_PCI) {
+			printk_err("child %s not a pci device\n", dev_path(*list));
+			continue;
+		}
 		if ((*list)->path.u.pci.devfn == devfn) {
 			/* Unlink from the list */
 			dev = *list;