patch-2.4.2 linux/drivers/atm/fore200e.c

Next file: linux/drivers/atm/iphase.c
Previous file: linux/drivers/atm/firestream.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/atm/fore200e.c linux/drivers/atm/fore200e.c
@@ -28,7 +28,7 @@
 #include <linux/version.h>
 #include <linux/config.h>
 #include <linux/kernel.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/capability.h>
 #include <linux/sched.h>
@@ -2020,6 +2020,8 @@
     struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
     int ok, i;
 
+    if (!prom)
+	return -ENOMEM;
     ok = fore200e->bus->prom_read(fore200e, prom);
     if (ok < 0)
 	return -EBUSY;

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