diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-08 10:39:35 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 16:29:01 (GMT) |
commit | 41f96935b4c41daea2c4dbbf137960375cf764c1 (patch) | |
tree | 9af3af5e41f68baf063b5f929797c837169bb9df /drivers/isdn/i4l/isdn_net.c | |
parent | 0b2dd130a5a8774a30de1f94266f6b9a9892153c (diff) | |
download | linux-41f96935b4c41daea2c4dbbf137960375cf764c1.tar.xz |
[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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 2e4daeb..c36c817 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 |