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>
This commit is contained in:
parent
fd45160cef
commit
6b5686891c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue