Skip to content

Commit

Permalink
mac80211: cleanup kmalloc/memset -> kcalloc
Browse files Browse the repository at this point in the history
Transform calls kmalloc/memset to a single kcalloc.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Wei Yongjun authored and John W. Linville committed Jan 29, 2009
1 parent 672cf3c commit e964817
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/mac80211/ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,

/* prepare reordering buffer */
tid_agg_rx->reorder_buf =
kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC);
kcalloc(buf_size, sizeof(struct sk_buff *), GFP_ATOMIC);
if (!tid_agg_rx->reorder_buf) {
#ifdef CONFIG_MAC80211_HT_DEBUG
if (net_ratelimit())
Expand All @@ -960,8 +960,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
kfree(sta->ampdu_mlme.tid_rx[tid]);
goto end;
}
memset(tid_agg_rx->reorder_buf, 0,
buf_size * sizeof(struct sk_buff *));

if (local->ops->ampdu_action)
ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START,
Expand Down

0 comments on commit e964817

Please sign in to comment.