]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - sound/soc/soc-core.c
treewide: devm_kzalloc() -> devm_kcalloc()
[mirror_ubuntu-jammy-kernel.git] / sound / soc / soc-core.c
index 61542847cb3b7bbdfedb9abb39f75f6de79ccb1c..4663de3cf495278f42b2950a3474ee4afb293674 100644 (file)
@@ -3354,7 +3354,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
                return -EINVAL;
        }
 
-       routes = devm_kzalloc(card->dev, num_routes * sizeof(*routes),
+       routes = devm_kcalloc(card->dev, num_routes, sizeof(*routes),
                              GFP_KERNEL);
        if (!routes) {
                dev_err(card->dev,
@@ -3678,8 +3678,8 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev,
                        dev_err(dev, "Bad phandle in 'sound-dai'\n");
                return num_codecs;
        }
-       component = devm_kzalloc(dev,
-                                sizeof *component * num_codecs,
+       component = devm_kcalloc(dev,
+                                num_codecs, sizeof(*component),
                                 GFP_KERNEL);
        if (!component)
                return -ENOMEM;