summaryrefslogtreecommitdiff
path: root/drivers/isdn/i4l/isdn_net.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-08 02:39:35 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:29:01 -0800
commit41f96935b4c41daea2c4dbbf137960375cf764c1 (patch)
tree9af3af5e41f68baf063b5f929797c837169bb9df /drivers/isdn/i4l/isdn_net.c
parent0b2dd130a5a8774a30de1f94266f6b9a9892153c (diff)
[PATCH] isdn: replace kmalloc+memset with kzalloc
Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/i4l/isdn_net.c')
-rw-r--r--drivers/isdn/i4l/isdn_net.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 2e4daebfb7e0..c36c817578cb 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -2542,17 +2542,15 @@ isdn_net_new(char *name, struct net_device *master)
printk(KERN_WARNING "isdn_net: interface %s already exists\n", name);
return NULL;
}
- if (!(netdev = (isdn_net_dev *) kmalloc(sizeof(isdn_net_dev), GFP_KERNEL))) {
+ if (!(netdev = kzalloc(sizeof(isdn_net_dev), GFP_KERNEL))) {
printk(KERN_WARNING "isdn_net: Could not allocate net-device\n");
return NULL;
}
- memset(netdev, 0, sizeof(isdn_net_dev));
- if (!(netdev->local = (isdn_net_local *) kmalloc(sizeof(isdn_net_local), GFP_KERNEL))) {
+ if (!(netdev->local = kzalloc(sizeof(isdn_net_local), GFP_KERNEL))) {
printk(KERN_WARNING "isdn_net: Could not allocate device locals\n");
kfree(netdev);
return NULL;
}
- memset(netdev->local, 0, sizeof(isdn_net_local));
if (name == NULL)
strcpy(netdev->local->name, " ");
else