]> err.no Git - linux-2.6/commitdiff
[PATCH] skge: use kzalloc
authorStephen Hemminger <shemminger@osdl.org>
Tue, 8 Nov 2005 18:33:41 +0000 (10:33 -0800)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 9 Nov 2005 04:58:08 +0000 (23:58 -0500)
Can use kzalloc in skge driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/skge.c

index fe806dbc1914fb6d19bf8be8f5234fec04128734..f411c5c804102fcc85d53cea1e38d287c24bcf5f 100644 (file)
@@ -3168,14 +3168,13 @@ static int __devinit skge_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;
        spin_lock_init(&hw->phy_lock);
        tasklet_init(&hw->ext_tasklet, skge_extirq, (unsigned long) hw);