From: Wei Yongjun Date: Thu, 15 Jan 2009 09:41:16 +0000 (+0800) Subject: mac80211: cleanup kmalloc/memset -> kcalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9648179706448d50884f172711b00a6e5ab9e42;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mac80211: cleanup kmalloc/memset -> kcalloc Transform calls kmalloc/memset to a single kcalloc. Signed-off-by: Wei Yongjun Signed-off-by: John W. Linville --- 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, /* 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()) @@ -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,