diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2009-01-15 04:41:16 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:47 -0500 |
commit | e9648179706448d50884f172711b00a6e5ab9e42 (patch) | |
tree | f64f99e771d29b7295fd9b31c36a4273543b639f /net/mac80211/ht.c | |
parent | 672cf3cefe5f686637dec72b9f3d21fe1cdc8c94 (diff) |
mac80211: cleanup kmalloc/memset -> kcalloc
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>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r-- | net/mac80211/ht.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index 6be485264236..7a38d2e76ca9 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -950,7 +950,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
950 | 950 | ||
951 | /* prepare reordering buffer */ | 951 | /* prepare reordering buffer */ |
952 | tid_agg_rx->reorder_buf = | 952 | tid_agg_rx->reorder_buf = |
953 | kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); | 953 | kcalloc(buf_size, sizeof(struct sk_buff *), GFP_ATOMIC); |
954 | if (!tid_agg_rx->reorder_buf) { | 954 | if (!tid_agg_rx->reorder_buf) { |
955 | #ifdef CONFIG_MAC80211_HT_DEBUG | 955 | #ifdef CONFIG_MAC80211_HT_DEBUG |
956 | if (net_ratelimit()) | 956 | if (net_ratelimit()) |
@@ -960,8 +960,6 @@ void ieee80211_process_addba_request(struct ieee80211_local *local, | |||
960 | kfree(sta->ampdu_mlme.tid_rx[tid]); | 960 | kfree(sta->ampdu_mlme.tid_rx[tid]); |
961 | goto end; | 961 | goto end; |
962 | } | 962 | } |
963 | memset(tid_agg_rx->reorder_buf, 0, | ||
964 | buf_size * sizeof(struct sk_buff *)); | ||
965 | 963 | ||
966 | if (local->ops->ampdu_action) | 964 | if (local->ops->ampdu_action) |
967 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, | 965 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, |