diff options
Diffstat (limited to 'arch/um/drivers/net_kern.c')
-rw-r--r-- | arch/um/drivers/net_kern.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 286bc0b3207f..b2e9762e13c5 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -334,13 +334,12 @@ static int eth_configure(int n, void *init, char *mac, | |||
334 | size = transport->private_size + sizeof(struct uml_net_private) + | 334 | size = transport->private_size + sizeof(struct uml_net_private) + |
335 | sizeof(((struct uml_net_private *) 0)->user); | 335 | sizeof(((struct uml_net_private *) 0)->user); |
336 | 336 | ||
337 | device = kmalloc(sizeof(*device), GFP_KERNEL); | 337 | device = kzalloc(sizeof(*device), GFP_KERNEL); |
338 | if (device == NULL) { | 338 | if (device == NULL) { |
339 | printk(KERN_ERR "eth_configure failed to allocate uml_net\n"); | 339 | printk(KERN_ERR "eth_configure failed to allocate uml_net\n"); |
340 | return(1); | 340 | return(1); |
341 | } | 341 | } |
342 | 342 | ||
343 | memset(device, 0, sizeof(*device)); | ||
344 | INIT_LIST_HEAD(&device->list); | 343 | INIT_LIST_HEAD(&device->list); |
345 | device->index = n; | 344 | device->index = n; |
346 | 345 | ||