summaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-01-17 22:43:18 +0100
committerJeff Garzik <jgarzik@pobox.com>2006-01-18 01:27:30 +0100
commit6aad85d6730d47d4867f24eeda517766aa89f8d0 (patch)
tree4bc4dff2f0dad994abb3bca18b710ce85f14546a /drivers/net/sky2.c
parent[PATCH] sky2: ratelimit error messages (diff)
downloadlinux-6aad85d6730d47d4867f24eeda517766aa89f8d0.tar.xz
linux-6aad85d6730d47d4867f24eeda517766aa89f8d0.zip
[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 '')
-rw-r--r--drivers/net/sky2.c3
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,
#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);