summaryrefslogtreecommitdiff
path: root/sound/soc/amd/acp/acp-pci.c
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-09-16 06:19:06 +0000
committerMark Brown <broonie@kernel.org>2022-09-19 17:52:37 +0100
commit8e34d743f97f151824a2dc0803695752de80bf7d (patch)
treecb89c29479cb00b689c8edeb79d9e0a5aef25105 /sound/soc/amd/acp/acp-pci.c
parent7b88552c26971ccbc6ff35e9d544f7fac94ffef1 (diff)
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 <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220916061906.152434-1-ye.xingchen@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp/acp-pci.c')
-rw-r--r--sound/soc/amd/acp/acp-pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index ef2ce083521e..a0c84cd07fde 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;