Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327727
b: refs/heads/master
c: cc7d723
h: refs/heads/master
i:
  327725: 9fbc09e
  327723: 1cb2e5a
  327719: 509a242
  327711: 47b832a
v: v3
  • Loading branch information
Sathya Perla authored and David S. Miller committed Aug 30, 2012
1 parent c3b577e commit 12760ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a046d3bfd5126b724a5352a757310229d4d3ff3
refs/heads/master: cc7d723adb7778e4eff8956f2d137c0729b9a81e
13 changes: 7 additions & 6 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3438,6 +3438,7 @@ static void be_ctrl_cleanup(struct be_adapter *adapter)
if (mem->va)
dma_free_coherent(&adapter->pdev->dev, mem->size, mem->va,
mem->dma);
kfree(adapter->pmac_id);
}

static int be_ctrl_init(struct be_adapter *adapter)
Expand Down Expand Up @@ -3474,6 +3475,12 @@ static int be_ctrl_init(struct be_adapter *adapter)
}
memset(rx_filter->va, 0, rx_filter->size);

/* primary mac needs 1 pmac entry */
adapter->pmac_id = kcalloc(adapter->max_pmac_cnt + 1,
sizeof(*adapter->pmac_id), GFP_KERNEL);
if (!adapter->pmac_id)
return -ENOMEM;

mutex_init(&adapter->mbox_lock);
spin_lock_init(&adapter->mcc_lock);
spin_lock_init(&adapter->mcc_cq_lock);
Expand Down Expand Up @@ -3610,12 +3617,6 @@ static int be_get_initial_config(struct be_adapter *adapter)
else
adapter->max_pmac_cnt = BE_VF_UC_PMAC_COUNT;

/* primary mac needs 1 pmac entry */
adapter->pmac_id = kcalloc(adapter->max_pmac_cnt + 1,
sizeof(u32), GFP_KERNEL);
if (!adapter->pmac_id)
return -ENOMEM;

status = be_cmd_get_cntl_attributes(adapter);
if (status)
return status;
Expand Down

0 comments on commit 12760ae

Please sign in to comment.