--- trunk/src/devices/bus_pci.c 2007/10/08 16:18:43 13 +++ trunk/src/devices/bus_pci.c 2007/10/08 16:18:51 14 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: bus_pci.c,v 1.10 2005/03/18 23:20:52 debug Exp $ + * $Id: bus_pci.c,v 1.12 2005/09/27 23:18:32 debug Exp $ * * This is a generic PCI bus device, used by even lower level devices. * For example, the "gt" device used in Cobalt machines contains a PCI @@ -43,6 +43,8 @@ #include "bus_pci.h" +/* #define debug fatal */ + /* * bus_pci_access(): @@ -153,6 +155,11 @@ { struct pci_device *new_device; + if (pci_data == NULL) { + fatal("bus_pci_add(): pci_data == NULL!\n"); + exit(1); + } + /* Make sure this bus/device/function number isn't already in use: */ new_device = pci_data->first_device; while (new_device != NULL) {