patch-2.4.1 linux/arch/ppc/8260_io/fcc_enet.c

Next file: linux/arch/ppc/8xx_io/enet.c
Previous file: linux/arch/ppc/8260_io/enet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/arch/ppc/8260_io/fcc_enet.c linux/arch/ppc/8260_io/fcc_enet.c
@@ -1082,6 +1082,9 @@
 		*/
 		cep = (struct fcc_enet_private *)
 					kmalloc(sizeof(*cep), GFP_KERNEL);
+		if (cep == NULL)
+			return -ENOMEM;
+
 		__clear_user(cep,sizeof(*cep));
 		spin_lock_init(&cep->lock);
 		cep->fip = fip;

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