diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-11-08 13:33:41 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-08 23:58:08 -0500 |
commit | 7e86306113ca9e418e49ff1c7c0984f8ffe8cf61 (patch) | |
tree | b8ea5564e4bf9c3b4ad69b8b02b6513b684f1166 /drivers/net/skge.c | |
parent | adba9e23b4066f1d741a2076fc6ad18b6c0cea44 (diff) |
[PATCH] skge: use kzalloc
Can use kzalloc in skge driver.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index fe806dbc1914..f411c5c80410 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -3168,14 +3168,13 @@ static int __devinit skge_probe(struct pci_dev *pdev, | |||
3168 | #endif | 3168 | #endif |
3169 | 3169 | ||
3170 | err = -ENOMEM; | 3170 | err = -ENOMEM; |
3171 | hw = kmalloc(sizeof(*hw), GFP_KERNEL); | 3171 | hw = kzalloc(sizeof(*hw), GFP_KERNEL); |
3172 | if (!hw) { | 3172 | if (!hw) { |
3173 | printk(KERN_ERR PFX "%s: cannot allocate hardware struct\n", | 3173 | printk(KERN_ERR PFX "%s: cannot allocate hardware struct\n", |
3174 | pci_name(pdev)); | 3174 | pci_name(pdev)); |
3175 | goto err_out_free_regions; | 3175 | goto err_out_free_regions; |
3176 | } | 3176 | } |
3177 | 3177 | ||
3178 | memset(hw, 0, sizeof(*hw)); | ||
3179 | hw->pdev = pdev; | 3178 | hw->pdev = pdev; |
3180 | spin_lock_init(&hw->phy_lock); | 3179 | spin_lock_init(&hw->phy_lock); |
3181 | tasklet_init(&hw->ext_tasklet, skge_extirq, (unsigned long) hw); | 3180 | tasklet_init(&hw->ext_tasklet, skge_extirq, (unsigned long) hw); |