ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups
alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Convert kmalloc's with multiplies to kmalloc_array. Fix a few whitespace defects. Convert a constant 6 to ETH_ALEN. Use parentheses around sizeof. Convert vmalloc/memset to vzalloc. Remove now unused size variables. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
09da6c5f60
commit
b2adaca92c
@@ -4969,10 +4969,8 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
hw = kzalloc(sizeof(*hw) + strlen(DRV_NAME "@pci:")
|
||||
+ strlen(pci_name(pdev)) + 1, GFP_KERNEL);
|
||||
if (!hw) {
|
||||
dev_err(&pdev->dev, "cannot allocate hardware struct\n");
|
||||
if (!hw)
|
||||
goto err_out_free_regions;
|
||||
}
|
||||
|
||||
hw->pdev = pdev;
|
||||
sprintf(hw->irq_name, DRV_NAME "@pci:%s", pci_name(pdev));
|
||||
|
Reference in New Issue
Block a user