diff options
Diffstat (limited to 'mac.c')
| -rw-r--r-- | mac.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -6431,7 +6431,7 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw, if (ret) goto exit; - arg = kzalloc(sizeof(*arg), GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -7559,8 +7559,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, } if (ath10k_debug_is_extd_tx_stats_enabled(ar)) { - arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats), - GFP_KERNEL); + arsta->tx_stats = kzalloc_obj(*arsta->tx_stats); if (!arsta->tx_stats) { ath10k_mac_dec_num_stations(arvif, sta); ret = -ENOMEM; @@ -7972,7 +7971,7 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw, scan_time_msec = ar->hw->wiphy->max_remain_on_channel_duration * 2; - arg = kzalloc(sizeof(*arg), GFP_KERNEL); + arg = kzalloc_obj(*arg); if (!arg) { ret = -ENOMEM; goto exit; @@ -8954,8 +8953,7 @@ ath10k_mac_op_change_chanctx(struct ieee80211_hw *hw, if (arg.n_vifs == 0) goto radar; - arg.vifs = kcalloc(arg.n_vifs, sizeof(arg.vifs[0]), - GFP_KERNEL); + arg.vifs = kzalloc_objs(arg.vifs[0], arg.n_vifs); if (!arg.vifs) goto radar; |
