Skip to content

Commit

Permalink
[PATCH] sky2: use kzalloc
Browse files Browse the repository at this point in the history
Can use kzalloc here.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jan 18, 2006
1 parent 3be92a7 commit 6aad85d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6aad85d

Please sign in to comment.