Commit 46ee9c14 authored by Ravikumar Nelavelli's avatar Ravikumar Nelavelli Committed by David S. Miller
Browse files

be2net: fix pmac_id[] allocation size

The allocation size must be be_max_uc() and not "be_max_uc() + 1"
Signed-off-by: default avatarRavikumar Nelavelli <>
Signed-off-by: default avatarSathya Perla <>
Signed-off-by: default avatarDavid S. Miller <>
parent bdac85b5
......@@ -3314,9 +3314,8 @@ static int be_get_config(struct be_adapter *adapter)
if (status)
return status;
/* primary mac needs 1 pmac entry */
adapter->pmac_id = kcalloc(be_max_uc(adapter) + 1, sizeof(u32),
adapter->pmac_id = kcalloc(be_max_uc(adapter),
sizeof(*adapter->pmac_id), GFP_KERNEL);
if (!adapter->pmac_id)
return -ENOMEM;
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