ath11k: Use kcalloc() instead of kzalloc()
Subsystems (3)
PATCH 1/1 ath11k: Use kcalloc() instead of kzalloc()
Use 2-factor multiplication argument form kcalloc() instead of kzalloc().
--- drivers/net/wireless/ath/ath11k/wmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/wmi.c +4 -4
@@ -4046,8 +4046,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 ));if (!svc_rdy_ext->n_mac_phy_caps) { - svc_rdy_ext->mac_phy_caps =kzalloc ((svc_rdy_ext->tot_phy_id) * len, -GFP_ATOMIC ); + svc_rdy_ext->mac_phy_caps =kcalloc (svc_rdy_ext->tot_phy_id, + len,GFP_ATOMIC );if (!svc_rdy_ext->mac_phy_caps)return -ENOMEM ; }
@@ -4447,8 +4447,8 @@ static struct cur_reg_rulestruct cur_reg_rule *reg_rule_ptr;u32 count; - reg_rule_ptr =kzalloc ((num_reg_rules *sizeof (*reg_rule_ptr)), -GFP_ATOMIC ); + reg_rule_ptr =kcalloc (num_reg_rules,sizeof (*reg_rule_ptr), +GFP_ATOMIC );if (!reg_rule_ptr)return NULL ;
Signature · 1 line
2.27.0
Quoted 6 lines · Gustavo A. R. Silva
Use 2-factor multiplication argument form
kcalloc()instead ofkzalloc().Signed-off-by Gustavo A. R. Silva <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
ec4363384c3f ath11k: Use kcalloc() instead of kzalloc()
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20211006181204.GA913553@embeddedor/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches