aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/sky2.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-03 12:43:58 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:22:33 -0500
commitb2adaca92c63b9bb8beb021d554f656e387a7648 (patch)
treeec0ca7c14267dc090435ddbefe29b110912b851f /drivers/net/ethernet/marvell/sky2.c
parent09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/marvell/sky2.c')
-rw-r--r--drivers/net/ethernet/marvell/sky2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 366a12aa3c74..fc07ca35721b 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4969,10 +4969,8 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
4969 4969
4970 hw = kzalloc(sizeof(*hw) + strlen(DRV_NAME "@pci:") 4970 hw = kzalloc(sizeof(*hw) + strlen(DRV_NAME "@pci:")
4971 + strlen(pci_name(pdev)) + 1, GFP_KERNEL); 4971 + strlen(pci_name(pdev)) + 1, GFP_KERNEL);
4972 if (!hw) { 4972 if (!hw)
4973 dev_err(&pdev->dev, "cannot allocate hardware struct\n");
4974 goto err_out_free_regions; 4973 goto err_out_free_regions;
4975 }
4976 4974
4977 hw->pdev = pdev; 4975 hw->pdev = pdev;
4978 sprintf(hw->irq_name, DRV_NAME "@pci:%s", pci_name(pdev)); 4976 sprintf(hw->irq_name, DRV_NAME "@pci:%s", pci_name(pdev));