patch-2.4.4 linux/drivers/pci/setup-res.c
Next file: linux/drivers/pcmcia/hd64465_ss.c
Previous file: linux/drivers/pci/quirks.c
Back to the patch index
Back to the overall index
-  Lines: 11
-  Date:
Fri Apr  6 10:51:19 2001
-  Orig file: 
v2.4.3/linux/drivers/pci/setup-res.c
-  Orig date: 
Mon Dec 11 13:46:26 2000
diff -u --recursive --new-file v2.4.3/linux/drivers/pci/setup-res.c linux/drivers/pci/setup-res.c
@@ -163,6 +163,10 @@
 				size = ln->res->end - ln->res->start;
 			if (r_size > size) {
 				tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
+				if (!tmp) {
+					printk("pdev_sort_resources(): kmalloc() failed!\n");
+					continue;
+				}
 				tmp->next = ln;
 				tmp->res = r;
 				tmp->dev = dev;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)