aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_net.c
diff options
context:
space:
mode:
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)
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