projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3be92a7
)
[PATCH] sky2: use kzalloc
author
Stephen Hemminger
<shemminger@osdl.org>
Tue, 17 Jan 2006 21:43:18 +0000
(13:43 -0800)
committer
Jeff Garzik
<jgarzik@pobox.com>
Wed, 18 Jan 2006 00:27:30 +0000
(19:27 -0500)
Can use kzalloc here.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/sky2.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/sky2.c
b/drivers/net/sky2.c
index 9308b3bbb5cb7e56bb603a533ea3ebb1858d5528..9dc4adb95a7c6b0a42838da86f7a7758e1405af7 100644
(file)
--- 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 = k
m
alloc(sizeof(*hw), GFP_KERNEL);
+ hw = k
z
alloc(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);