treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / net / wireless / broadcom / brcm80211 / brcmsmac / phy / phy_n.c
index 7e01981bc5c8bf70475712c0942aa8cfe36c7c94..1a187557982e6c2d63f9c37e37229cf375ffd135 100644 (file)
@@ -23032,7 +23032,7 @@ wlc_phy_loadsampletable_nphy(struct brcms_phy *pi, struct cordic_iq *tone_buf,
        u16 t;
        u32 *data_buf = NULL;
 
-       data_buf = kmalloc(sizeof(u32) * num_samps, GFP_ATOMIC);
+       data_buf = kmalloc_array(num_samps, sizeof(u32), GFP_ATOMIC);
        if (data_buf == NULL)
                return;
 
@@ -23074,7 +23074,8 @@ wlc_phy_gen_load_samples_nphy(struct brcms_phy *pi, u32 f_kHz, u16 max_val,
                tbl_len = (phy_bw << 1);
        }
 
-       tone_buf = kmalloc(sizeof(struct cordic_iq) * tbl_len, GFP_ATOMIC);
+       tone_buf = kmalloc_array(tbl_len, sizeof(struct cordic_iq),
+                                GFP_ATOMIC);
        if (tone_buf == NULL)
                return 0;