From: Stephen Hemminger Date: Tue, 17 Jan 2006 21:43:18 +0000 (-0800) Subject: [PATCH] sky2: use kzalloc X-Git-Tag: v2.6.16-rc2~366^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6aad85d6730d47d4867f24eeda517766aa89f8d0;p=linux-2.6-omap-h63xx.git [PATCH] sky2: use kzalloc Can use kzalloc here. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 9308b3bbb5c..9dc4adb95a7 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -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);