提交 c239838f 编写于 作者: D Dan Carpenter 提交者: Kalle Valo

p54: allocate enough space for ->used_rxkeys

We have the number of longs, but we should be calculating the number of
bytes needed.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 e48d661e
......@@ -176,8 +176,9 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
* keeping a extra list for uploaded keys.
*/
priv->used_rxkeys = kzalloc(BITS_TO_LONGS(
priv->rx_keycache_size), GFP_KERNEL);
priv->used_rxkeys = kcalloc(BITS_TO_LONGS(priv->rx_keycache_size),
sizeof(long),
GFP_KERNEL);
if (!priv->used_rxkeys)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册