patch-2.4.27 linux-2.4.27/arch/alpha/kernel/sys_takara.c

Next file: linux-2.4.27/arch/cris/drivers/eeprom.c
Previous file: linux-2.4.27/arch/alpha/kernel/sys_eiger.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/arch/alpha/kernel/sys_takara.c linux-2.4.27/arch/alpha/kernel/sys_takara.c
@@ -230,8 +230,12 @@
 	int slot = PCI_SLOT(dev->devfn);
 	int pin = *pinp;
 	unsigned int ctlreg = inl(0x500);
-	unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
+	unsigned int busslot;
 
+	if (!dev->bus->self)
+		return slot;
+
+	busslot = PCI_SLOT(dev->bus->self->devfn);
 	/* Check for built-in bridges.  */
 	if (dev->bus->number != 0
 	    && busslot > 16

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)