提交 46ee9c14 编写于 作者: R Ravikumar Nelavelli 提交者: David S. Miller

be2net: fix pmac_id[] allocation size

The allocation size must be be_max_uc() and not "be_max_uc() + 1"
Signed-off-by: NRavikumar Nelavelli <ravikumar.nelavelli@emulex.com>
Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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),
GFP_KERNEL);
adapter->pmac_id = kcalloc(be_max_uc(adapter),
sizeof(*adapter->pmac_id), GFP_KERNEL);
if (!adapter->pmac_id)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册