On Fri, 2012-06-29 at 15:56 +0200, Johannes Berg wrote: > On Fri, 2012-06-29 at 06:26 -0700, Thomas Huehn wrote: [] > > diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c [] > > @@ -809,11 +809,11 @@ minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) > > max_rates = sband->n_bitrates; > > } > > > > - msp = kzalloc(sizeof(struct minstrel_ht_sta), gfp); > > + msp = kzalloc(sizeof(*msp), gfp); > > if (!msp) > > return NULL; > > > > - msp->ratelist = kzalloc(sizeof(struct minstrel_rate) * max_rates, gfp); > > + msp->ratelist = kzalloc(sizeof(*msp->ratelist) * max_rates, gfp); trivia: this might be better as kcalloc -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html