patch-2.4.1 linux/arch/ppc/8xx_io/fec.c

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

diff -u --recursive --new-file v2.4.0/linux/arch/ppc/8xx_io/fec.c linux/arch/ppc/8xx_io/fec.c
@@ -1459,6 +1459,9 @@
 	/* Allocate some private information.
 	*/
 	fep = (struct fec_enet_private *)kmalloc(sizeof(*fep), GFP_KERNEL);
+	if (fep == NULL)
+		return -ENOMEM;
+
 	__clear_user(fep,sizeof(*fep));
 
 	/* Create an Ethernet device instance.

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