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
- Lines: 11
- Date:
Mon Jan 22 15:41:14 2001
- Orig file:
v2.4.0/linux/arch/ppc/8xx_io/enet.c
- Orig date:
Sun Sep 17 09:48:05 2000
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)