summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intersil
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-05-06 03:48:35 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-05-22 18:30:09 +0300
commitc239838fbd6d5aadac193e02d0cf1866238da97b (patch)
tree9481b90ef5befa68758cdff9a78799b6255de8c1 /drivers/net/wireless/intersil
parente48d661eb13f2f83861428f001c567fdb3f317e8 (diff)
downloadlinux-c239838fbd6d5aadac193e02d0cf1866238da97b.tar.xz
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intersil')
-rw-r--r--drivers/net/wireless/intersil/p54/fwio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/intersil/p54/fwio.c b/drivers/net/wireless/intersil/p54/fwio.c
index 4ac6764f4897..3076f646c829 100644
--- a/drivers/net/wireless/intersil/p54/fwio.c
+++ b/drivers/net/wireless/intersil/p54/fwio.c
@@ -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;