From: ye xingchen Date: Fri, 16 Sep 2022 06:19:06 +0000 (+0000) Subject: ASoC: amd: acp: use devm_kcalloc() instead of devm_kzalloc() X-Git-Tag: v6.1-rc5~4^2~17^2~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e34d743f97f151824a2dc0803695752de80bf7d;p=platform%2Fkernel%2Flinux-starfive.git ASoC: amd: acp: use devm_kcalloc() instead of devm_kzalloc() Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Reported-by: Zeal Robot Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/20220916061906.152434-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown --- diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c index ef2ce08..a0c84cd 100644 --- a/sound/soc/amd/acp/acp-pci.c +++ b/sound/soc/amd/acp/acp-pci.c @@ -107,7 +107,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id goto unregister_dmic_dev; } - res = devm_kzalloc(&pci->dev, sizeof(struct resource) * num_res, GFP_KERNEL); + res = devm_kcalloc(&pci->dev, num_res, sizeof(struct resource), GFP_KERNEL); if (!res) { ret = -ENOMEM; goto unregister_dmic_dev;