patch-2.2.11 linux/drivers/pci/pci.c
Next file: linux/drivers/sbus/audio/audio.c
Previous file: linux/drivers/pci/oldproc.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Mon Aug 9 12:04:39 1999
- Orig file:
v2.2.10/linux/drivers/pci/pci.c
- Orig date:
Sun Mar 7 15:19:55 1999
diff -u --recursive --new-file v2.2.10/linux/drivers/pci/pci.c linux/drivers/pci/pci.c
@@ -184,6 +184,11 @@
}
dev = kmalloc(sizeof(*dev), GFP_ATOMIC);
+ if(dev==NULL)
+ {
+ printk(KERN_ERR "pci: out of memory.\n");
+ continue;
+ }
memset(dev, 0, sizeof(*dev));
dev->bus = bus;
dev->devfn = devfn;
@@ -292,6 +297,11 @@
* Insert it into the tree of buses.
*/
child = kmalloc(sizeof(*child), GFP_ATOMIC);
+ if(child==NULL)
+ {
+ printk(KERN_ERR "pci: out of memory for bridge.\n");
+ continue;
+ }
memset(child, 0, sizeof(*child));
child->next = bus->children;
bus->children = child;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)