Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

be2net: return -ENOMEM for memory allocation failures

parent fd45160c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}