Commit b3d6125e authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Handle kmalloc fails: drivers_net_fec.c

From:  Pablo Menichini <pablo@menichini.com.ar>
parent 76b88ed1
......@@ -1646,6 +1646,8 @@ int __init fec_enet_init(struct net_device *dev)
/* Allocate some private information.
*/
fep = (struct fec_enet_private *)kmalloc(sizeof(*fep), GFP_KERNEL);
if (!fep)
return -ENOMEM;
memset(fep, 0, sizeof(*fep));
/* Create an Ethernet device instance.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment