]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - net/mac80211/rc80211_minstrel.c
treewide: kzalloc() -> kcalloc()
[mirror_ubuntu-hirsute-kernel.git] / net / mac80211 / rc80211_minstrel.c
index 8221bc5582abf74251a6c76550e1a8dce71538e3..76048b53c5b27637d343868c69ab54c928c6614d 100644 (file)
@@ -592,11 +592,11 @@ minstrel_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
                        max_rates = sband->n_bitrates;
        }
 
-       mi->r = kzalloc(sizeof(struct minstrel_rate) * max_rates, gfp);
+       mi->r = kcalloc(max_rates, sizeof(struct minstrel_rate), gfp);
        if (!mi->r)
                goto error;
 
-       mi->sample_table = kmalloc(SAMPLE_COLUMNS * max_rates, gfp);
+       mi->sample_table = kmalloc_array(max_rates, SAMPLE_COLUMNS, gfp);
        if (!mi->sample_table)
                goto error1;