Commit ec436338 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kalle Valo

ath11k: Use kcalloc() instead of kzalloc()

Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().

Link: https://github.com/KSPP/linux/issues/162Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211006181204.GA913553@embeddedor
parent 4f50bdfb
...@@ -4065,8 +4065,8 @@ static int ath11k_wmi_tlv_mac_phy_caps_parse(struct ath11k_base *soc, ...@@ -4065,8 +4065,8 @@ static int ath11k_wmi_tlv_mac_phy_caps_parse(struct ath11k_base *soc,
len = min_t(u16, len, sizeof(struct wmi_mac_phy_capabilities)); len = min_t(u16, len, sizeof(struct wmi_mac_phy_capabilities));
if (!svc_rdy_ext->n_mac_phy_caps) { if (!svc_rdy_ext->n_mac_phy_caps) {
svc_rdy_ext->mac_phy_caps = kzalloc((svc_rdy_ext->tot_phy_id) * len, svc_rdy_ext->mac_phy_caps = kcalloc(svc_rdy_ext->tot_phy_id,
GFP_ATOMIC); len, GFP_ATOMIC);
if (!svc_rdy_ext->mac_phy_caps) if (!svc_rdy_ext->mac_phy_caps)
return -ENOMEM; return -ENOMEM;
} }
...@@ -4466,7 +4466,7 @@ static struct cur_reg_rule ...@@ -4466,7 +4466,7 @@ static struct cur_reg_rule
struct cur_reg_rule *reg_rule_ptr; struct cur_reg_rule *reg_rule_ptr;
u32 count; u32 count;
reg_rule_ptr = kzalloc((num_reg_rules * sizeof(*reg_rule_ptr)), reg_rule_ptr = kcalloc(num_reg_rules, sizeof(*reg_rule_ptr),
GFP_ATOMIC); GFP_ATOMIC);
if (!reg_rule_ptr) if (!reg_rule_ptr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment