aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlegacy/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/common.c')
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 063e19ced7c8..6514baf799fe 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -922,7 +922,7 @@ il_init_channel_map(struct il_priv *il)
922 D_EEPROM("Parsing data for %d channels.\n", il->channel_count); 922 D_EEPROM("Parsing data for %d channels.\n", il->channel_count);
923 923
924 il->channel_info = 924 il->channel_info =
925 kzalloc(sizeof(struct il_channel_info) * il->channel_count, 925 kcalloc(il->channel_count, sizeof(struct il_channel_info),
926 GFP_KERNEL); 926 GFP_KERNEL);
927 if (!il->channel_info) { 927 if (!il->channel_info) {
928 IL_ERR("Could not allocate channel_info\n"); 928 IL_ERR("Could not allocate channel_info\n");
@@ -3041,9 +3041,9 @@ il_tx_queue_init(struct il_priv *il, u32 txq_id)
3041 } 3041 }
3042 3042
3043 txq->meta = 3043 txq->meta =
3044 kzalloc(sizeof(struct il_cmd_meta) * actual_slots, GFP_KERNEL); 3044 kcalloc(actual_slots, sizeof(struct il_cmd_meta), GFP_KERNEL);
3045 txq->cmd = 3045 txq->cmd =
3046 kzalloc(sizeof(struct il_device_cmd *) * actual_slots, GFP_KERNEL); 3046 kcalloc(actual_slots, sizeof(struct il_device_cmd *), GFP_KERNEL);
3047 3047
3048 if (!txq->meta || !txq->cmd) 3048 if (!txq->meta || !txq->cmd)
3049 goto out_free_arrays; 3049 goto out_free_arrays;
@@ -3455,7 +3455,7 @@ il_init_geos(struct il_priv *il)
3455 } 3455 }
3456 3456
3457 channels = 3457 channels =
3458 kzalloc(sizeof(struct ieee80211_channel) * il->channel_count, 3458 kcalloc(il->channel_count, sizeof(struct ieee80211_channel),
3459 GFP_KERNEL); 3459 GFP_KERNEL);
3460 if (!channels) 3460 if (!channels)
3461 return -ENOMEM; 3461 return -ENOMEM;
@@ -4654,8 +4654,9 @@ il_alloc_txq_mem(struct il_priv *il)
4654{ 4654{
4655 if (!il->txq) 4655 if (!il->txq)
4656 il->txq = 4656 il->txq =
4657 kzalloc(sizeof(struct il_tx_queue) * 4657 kcalloc(il->cfg->num_of_queues,
4658 il->cfg->num_of_queues, GFP_KERNEL); 4658 sizeof(struct il_tx_queue),
4659 GFP_KERNEL);
4659 if (!il->txq) { 4660 if (!il->txq) {
4660 IL_ERR("Not enough memory for txq\n"); 4661 IL_ERR("Not enough memory for txq\n");
4661 return -ENOMEM; 4662 return -ENOMEM;