diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-09-16 08:25:11 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-19 18:52:36 +0200 |
commit | 7b88552c26971ccbc6ff35e9d544f7fac94ffef1 (patch) | |
tree | 6c1b0242b2466bdeb56d174a4c313e289d4d02dc /sound/soc/sof/nocodec.c | |
parent | ASoC: Intel: sof_nau8825: use function devm_kcalloc() instead of devm_kzalloc() (diff) | |
download | linux-7b88552c26971ccbc6ff35e9d544f7fac94ffef1.tar.xz linux-7b88552c26971ccbc6ff35e9d544f7fac94ffef1.zip |
ASOC: SOF: 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>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220916062511.153962-1-ye.xingchen@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/nocodec.c')
-rw-r--r-- | sound/soc/sof/nocodec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c index 356497fe4f4c..3537805070ad 100644 --- a/sound/soc/sof/nocodec.c +++ b/sound/soc/sof/nocodec.c @@ -32,7 +32,7 @@ static int sof_nocodec_bes_setup(struct device *dev, /* set up BE dai_links */ for (i = 0; i < link_num; i++) { - dlc = devm_kzalloc(dev, 3 * sizeof(*dlc), GFP_KERNEL); + dlc = devm_kcalloc(dev, 3, sizeof(*dlc), GFP_KERNEL); if (!dlc) return -ENOMEM; @@ -78,7 +78,7 @@ static int sof_nocodec_setup(struct device *dev, struct snd_soc_dai_link *links; /* create dummy BE dai_links */ - links = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link) * num_dai_drivers, GFP_KERNEL); + links = devm_kcalloc(dev, num_dai_drivers, sizeof(struct snd_soc_dai_link), GFP_KERNEL); if (!links) return -ENOMEM; |