diff options
author | Kalesh AP <kalesh.purayil@emulex.com> | 2014-07-17 16:20:22 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-17 16:38:14 -0700 |
commit | 6b5686891c9858aea914c1d1c965d6bbc8a0521d (patch) | |
tree | efc3d2fb6874e9d4b9fc9a2922528f71438f4697 /drivers | |
parent | fd45160cef0a4782cde70ec4cdeb9421ea8460b6 (diff) | |
download | linux-6b5686891c9858aea914c1d1c965d6bbc8a0521d.tar.bz2 |
be2net: return -ENOMEM for memory allocation failures
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 1f3daee5edc3..8826b778b3ab 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -2931,7 +2931,7 @@ static int be_setup_wol(struct be_adapter *adapter, bool enable) cmd.va = dma_zalloc_coherent(&adapter->pdev->dev, cmd.size, &cmd.dma, GFP_KERNEL); if (cmd.va == NULL) - return -1; + return -ENOMEM; if (enable) { status = pci_write_config_dword(adapter->pdev, @@ -4586,7 +4586,7 @@ static int be_stats_init(struct be_adapter *adapter) cmd->va = dma_zalloc_coherent(&adapter->pdev->dev, cmd->size, &cmd->dma, GFP_KERNEL); if (cmd->va == NULL) - return -1; + return -ENOMEM; return 0; } |