提交 1728ff51 编写于 作者: B Bruce Allan 提交者: Zheng Zengkai

ice: fix memory allocation call

stable inclusion
from stable-5.10.30
commit 286830a8469cb255c106849616699e37ce6201e2
bugzilla: 51791

--------------------------------

commit 59df14f9 upstream.

Fix the order of number of array members and member size parameters in a
*calloc() call.

Fixes: b3c38904 ("ice: avoid unnecessary single-member variable-length structs")
Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
Tested-by: NTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 7b2a7dda
......@@ -717,8 +717,8 @@ static enum ice_status ice_cfg_fw_log(struct ice_hw *hw, bool enable)
if (!data) {
data = devm_kcalloc(ice_hw_to_dev(hw),
sizeof(*data),
ICE_AQC_FW_LOG_ID_MAX,
sizeof(*data),
GFP_KERNEL);
if (!data)
return ICE_ERR_NO_MEMORY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册