summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/emac/mal.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-03 17:43:58 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:22:33 -0500
commitb2adaca92c63b9bb8beb021d554f656e387a7648 (patch)
treeec0ca7c14267dc090435ddbefe29b110912b851f /drivers/net/ethernet/ibm/emac/mal.c
parent09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 (diff)
downloadlinux-b2adaca92c63b9bb8beb021d554f656e387a7648.tar.bz2
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/mal.c')
-rw-r--r--drivers/net/ethernet/ibm/emac/mal.c7
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)
irq_handler_t hdlr_serr, hdlr_txde, hdlr_rxde;
mal = kzalloc(sizeof(struct mal_instance), GFP_KERNEL);
- if (!mal) {
- printk(KERN_ERR
- "mal%d: out of memory allocating MAL structure!\n",
- index);
+ if (!mal)
return -ENOMEM;
- }
+
mal->index = index;
mal->ofdev = ofdev;
mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1;