Commit 6b568689 authored by Kalesh AP's avatar Kalesh AP Committed by David S. Miller
Browse files

be2net: return -ENOMEM for memory allocation failures


Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd45160c
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment