um: replace kmalloc+memset with kzalloc
authorYan Burman <burman.yan@gmail.com>
Tue, 12 Dec 2006 18:54:52 +0000 (19:54 +0100)
committerAdrian Bunk <bunk@stusta.de>
Tue, 12 Dec 2006 18:54:52 +0000 (19:54 +0100)
Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
arch/um/drivers/net_kern.c

index 286bc0b3207fd7b13b861088473959933f8aa99b..b2e9762e13c5af974caf06c8c9116071835ecdaf 100644 (file)
@@ -334,13 +334,12 @@ static int eth_configure(int n, void *init, char *mac,
        size = transport->private_size + sizeof(struct uml_net_private) + 
                sizeof(((struct uml_net_private *) 0)->user);
 
-       device = kmalloc(sizeof(*device), GFP_KERNEL);
+       device = kzalloc(sizeof(*device), GFP_KERNEL);
        if (device == NULL) {
                printk(KERN_ERR "eth_configure failed to allocate uml_net\n");
                return(1);
        }
 
-       memset(device, 0, sizeof(*device));
        INIT_LIST_HEAD(&device->list);
        device->index = n;