@@ -2651,7 +2651,7 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
if (ret)
return ret;
- path = kzalloc(sizeof(struct snd_soc_dapm_path), GFP_KERNEL);
+ path = kzalloc(sizeof(*path), GFP_KERNEL);
if (!path)
return -ENOMEM;
@@ -3859,10 +3859,9 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
}
kcontrol_dai_link[0].private_value = private_value;
/* duplicate kcontrol_dai_link on heap so that memory persists */
- template.kcontrol_news =
- devm_kmemdup(card->dev, &kcontrol_dai_link[0],
- sizeof(struct snd_kcontrol_new),
- GFP_KERNEL);
+ template.kcontrol_news = devm_kmemdup(card->dev, &kcontrol_dai_link[0],
+ sizeof(*template.kcontrol_news),
+ GFP_KERNEL);
if (!template.kcontrol_news) {
ret = -ENOMEM;
goto outfree_private_value;