[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4566DE24.5070108@gmail.com>
Date: Fri, 24 Nov 2006 13:57:24 +0200
From: Yan Burman <burman.yan@...il.com>
To: linux-kernel@...r.kernel.org
CC: jdike@...aya.com, trivial@...nel.org
Subject: [PATCH 2.6.19-rc6] um: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <burman.yan@...il.com>
diff -rubp linux-2.6.19-rc5_orig/arch/um/drivers/net_kern.c linux-2.6.19-rc5_kzalloc/arch/um/drivers/net_kern.c
--- linux-2.6.19-rc5_orig/arch/um/drivers/net_kern.c 2006-11-09 12:16:22.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/arch/um/drivers/net_kern.c 2006-11-11 22:44:04.000000000 +0200
@@ -333,13 +333,12 @@ static int eth_configure(int n, void *in
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;
Regards
Yan Burman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists