[PATCH] sky2: use kzalloc
[deliverable/linux.git] / drivers / net / sky2.c
index 9308b3bbb5cb7e56bb603a533ea3ebb1858d5528..9dc4adb95a7c6b0a42838da86f7a7758e1405af7 100644 (file)
@@ -3099,14 +3099,13 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
 #endif
 
        err = -ENOMEM;
-       hw = kmalloc(sizeof(*hw), GFP_KERNEL);
+       hw = kzalloc(sizeof(*hw), GFP_KERNEL);
        if (!hw) {
                printk(KERN_ERR PFX "%s: cannot allocate hardware struct\n",
                       pci_name(pdev));
                goto err_out_free_regions;
        }
 
-       memset(hw, 0, sizeof(*hw));
        hw->pdev = pdev;
 
        hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000);
This page took 0.074253 seconds and 5 git commands to generate.