diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-08 05:39:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:01 -0500 |
commit | 41f96935b4c41daea2c4dbbf137960375cf764c1 (patch) | |
tree | 9af3af5e41f68baf063b5f929797c837169bb9df /drivers/isdn/i4l/isdn_net.c | |
parent | 0b2dd130a5a8774a30de1f94266f6b9a9892153c (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.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 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) | |||
2542 | printk(KERN_WARNING "isdn_net: interface %s already exists\n", name); | 2542 | printk(KERN_WARNING "isdn_net: interface %s already exists\n", name); |
2543 | return NULL; | 2543 | return NULL; |
2544 | } | 2544 | } |
2545 | if (!(netdev = (isdn_net_dev *) kmalloc(sizeof(isdn_net_dev), GFP_KERNEL))) { | 2545 | if (!(netdev = kzalloc(sizeof(isdn_net_dev), GFP_KERNEL))) { |
2546 | printk(KERN_WARNING "isdn_net: Could not allocate net-device\n"); | 2546 | printk(KERN_WARNING "isdn_net: Could not allocate net-device\n"); |
2547 | return NULL; | 2547 | return NULL; |
2548 | } | 2548 | } |
2549 | memset(netdev, 0, sizeof(isdn_net_dev)); | 2549 | if (!(netdev->local = kzalloc(sizeof(isdn_net_local), GFP_KERNEL))) { |
2550 | if (!(netdev->local = (isdn_net_local *) kmalloc(sizeof(isdn_net_local), GFP_KERNEL))) { | ||
2551 | printk(KERN_WARNING "isdn_net: Could not allocate device locals\n"); | 2550 | printk(KERN_WARNING "isdn_net: Could not allocate device locals\n"); |
2552 | kfree(netdev); | 2551 | kfree(netdev); |
2553 | return NULL; | 2552 | return NULL; |
2554 | } | 2553 | } |
2555 | memset(netdev->local, 0, sizeof(isdn_net_local)); | ||
2556 | if (name == NULL) | 2554 | if (name == NULL) |
2557 | strcpy(netdev->local->name, " "); | 2555 | strcpy(netdev->local->name, " "); |
2558 | else | 2556 | else |