diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 55ec44a27e89e65e8d01c750ebca0f76bcf4e152..23362e8c696fbb66a9efa68a7a9ef1a399bf0899 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -287,7 +287,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 	struct resource *res;
 	int i;
 
-	if (!dev)		/* It's a host bus, nothing to read */
+	if (!child->parent)	/* It's a host bus, nothing to read */
 		return;
 
 	if (dev->transparent) {