Skip to content

Commit

Permalink
um: replace kmalloc+memset with kzalloc
Browse files Browse the repository at this point in the history
Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
Yan Burman authored and Adrian Bunk committed Dec 12, 2006
1 parent 47c6bf7 commit 0268bd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/um/drivers/net_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0268bd0

Please sign in to comment.