From: Stephen Hemminger Date: Tue, 8 Nov 2005 18:33:41 +0000 (-0800) Subject: [PATCH] skge: use kzalloc X-Git-Tag: v2.6.15-rc1~69^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e86306113ca9e418e49ff1c7c0984f8ffe8cf61;p=linux-2.6 [PATCH] skge: use kzalloc Can use kzalloc in skge driver. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/skge.c b/drivers/net/skge.c index fe806dbc19..f411c5c804 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -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);