aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/wanxl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/wanxl.c')
-rw-r--r--drivers/net/wan/wanxl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index c73601574334..3c78f9856380 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -599,7 +599,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
599 } 599 }
600 600
601 alloc_size = sizeof(card_t) + ports * sizeof(port_t); 601 alloc_size = sizeof(card_t) + ports * sizeof(port_t);
602 card = kmalloc(alloc_size, GFP_KERNEL); 602 card = kzalloc(alloc_size, GFP_KERNEL);
603 if (card == NULL) { 603 if (card == NULL) {
604 printk(KERN_ERR "wanXL %s: unable to allocate memory\n", 604 printk(KERN_ERR "wanXL %s: unable to allocate memory\n",
605 pci_name(pdev)); 605 pci_name(pdev));
@@ -607,7 +607,6 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
607 pci_disable_device(pdev); 607 pci_disable_device(pdev);
608 return -ENOBUFS; 608 return -ENOBUFS;
609 } 609 }
610 memset(card, 0, alloc_size);
611 610
612 pci_set_drvdata(pdev, card); 611 pci_set_drvdata(pdev, card);
613 card->pdev = pdev; 612 card->pdev = pdev;