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

Next file: linux/arch/ppc/8xx_io/fec.c
Previous file: linux/arch/ppc/8260_io/fcc_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/enet.c linux/arch/ppc/8xx_io/enet.c
@@ -652,7 +652,9 @@
 	/* Allocate some private information.
 	*/
 	cep = (struct scc_enet_private *)kmalloc(sizeof(*cep), GFP_KERNEL);
-	/*memset(cep, 0, sizeof(*cep));*/
+	if (cep == NULL)
+		return -ENOMEM;
+
 	__clear_user(cep,sizeof(*cep));
 	spin_lock_init(&cep->lock);
 

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