diff options
author | Joe Perches <joe@perches.com> | 2013-02-03 12:43:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:22:33 -0500 |
commit | b2adaca92c63b9bb8beb021d554f656e387a7648 (patch) | |
tree | ec0ca7c14267dc090435ddbefe29b110912b851f /drivers/net/ethernet/ibm/emac | |
parent | 09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 (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/ibm/emac')
-rw-r--r-- | drivers/net/ethernet/ibm/emac/mal.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c index 50ea12bfb579..1f7ecf57181e 100644 --- a/drivers/net/ethernet/ibm/emac/mal.c +++ b/drivers/net/ethernet/ibm/emac/mal.c | |||
@@ -528,12 +528,9 @@ static int mal_probe(struct platform_device *ofdev) | |||
528 | irq_handler_t hdlr_serr, hdlr_txde, hdlr_rxde; | 528 | irq_handler_t hdlr_serr, hdlr_txde, hdlr_rxde; |
529 | 529 | ||
530 | mal = kzalloc(sizeof(struct mal_instance), GFP_KERNEL); | 530 | mal = kzalloc(sizeof(struct mal_instance), GFP_KERNEL); |
531 | if (!mal) { | 531 | if (!mal) |
532 | printk(KERN_ERR | ||
533 | "mal%d: out of memory allocating MAL structure!\n", | ||
534 | index); | ||
535 | return -ENOMEM; | 532 | return -ENOMEM; |
536 | } | 533 | |
537 | mal->index = index; | 534 | mal->index = index; |
538 | mal->ofdev = ofdev; | 535 | mal->ofdev = ofdev; |
539 | mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; | 536 | mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; |