From: Kalesh AP Date: Thu, 17 Jul 2014 10:50:22 +0000 (+0530) Subject: be2net: return -ENOMEM for memory allocation failures X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6b5686891c9858aea914c1d1c965d6bbc8a0521d;p=openwrt%2Fstaging%2Fblogic.git be2net: return -ENOMEM for memory allocation failures Signed-off-by: Sathya Perla Signed-off-by: David S. Miller --- 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; }