Commit c239838f authored by Dan Carpenter's avatar Dan Carpenter Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent e48d661e
...@@ -176,8 +176,9 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw) ...@@ -176,8 +176,9 @@ int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
* keeping a extra list for uploaded keys. * keeping a extra list for uploaded keys.
*/ */
priv->used_rxkeys = kzalloc(BITS_TO_LONGS( priv->used_rxkeys = kcalloc(BITS_TO_LONGS(priv->rx_keycache_size),
priv->rx_keycache_size), GFP_KERNEL); sizeof(long),
GFP_KERNEL);
if (!priv->used_rxkeys) if (!priv->used_rxkeys)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
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