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/myricom/myri10ge | |
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/myricom/myri10ge')
-rw-r--r-- | drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index f8408d6e961c..4f9937e026e5 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c | |||
@@ -664,10 +664,9 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp) | |||
664 | /* copy header of running firmware from SRAM to host memory to | 664 | /* copy header of running firmware from SRAM to host memory to |
665 | * validate firmware */ | 665 | * validate firmware */ |
666 | hdr = kmalloc(bytes, GFP_KERNEL); | 666 | hdr = kmalloc(bytes, GFP_KERNEL); |
667 | if (hdr == NULL) { | 667 | if (hdr == NULL) |
668 | dev_err(dev, "could not malloc firmware hdr\n"); | ||
669 | return -ENOMEM; | 668 | return -ENOMEM; |
670 | } | 669 | |
671 | memcpy_fromio(hdr, mgp->sram + hdr_offset, bytes); | 670 | memcpy_fromio(hdr, mgp->sram + hdr_offset, bytes); |
672 | status = myri10ge_validate_firmware(mgp, hdr); | 671 | status = myri10ge_validate_firmware(mgp, hdr); |
673 | kfree(hdr); | 672 | kfree(hdr); |