Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9648179 authored by Wei Yongjun's avatar Wei Yongjun Committed by John W. Linville
Browse files

mac80211: cleanup kmalloc/memset -> kcalloc



Transform calls kmalloc/memset to a single kcalloc.

Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 672cf3ce
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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,