diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-01-17 16:43:18 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 19:27:30 -0500 |
commit | 6aad85d6730d47d4867f24eeda517766aa89f8d0 (patch) | |
tree | 4bc4dff2f0dad994abb3bca18b710ce85f14546a /drivers/net/sky2.c | |
parent | 3be92a70237a1bd813e46d6683a55b508627013a (diff) |
[PATCH] sky2: use kzalloc
Can use kzalloc here.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 9308b3bbb5cb..9dc4adb95a7c 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -3099,14 +3099,13 @@ static int __devinit sky2_probe(struct pci_dev *pdev, | |||
3099 | #endif | 3099 | #endif |
3100 | 3100 | ||
3101 | err = -ENOMEM; | 3101 | err = -ENOMEM; |
3102 | hw = kmalloc(sizeof(*hw), GFP_KERNEL); | 3102 | hw = kzalloc(sizeof(*hw), GFP_KERNEL); |
3103 | if (!hw) { | 3103 | if (!hw) { |
3104 | printk(KERN_ERR PFX "%s: cannot allocate hardware struct\n", | 3104 | printk(KERN_ERR PFX "%s: cannot allocate hardware struct\n", |
3105 | pci_name(pdev)); | 3105 | pci_name(pdev)); |
3106 | goto err_out_free_regions; | 3106 | goto err_out_free_regions; |
3107 | } | 3107 | } |
3108 | 3108 | ||
3109 | memset(hw, 0, sizeof(*hw)); | ||
3110 | hw->pdev = pdev; | 3109 | hw->pdev = pdev; |
3111 | 3110 | ||
3112 | hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); | 3111 | hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); |