提交 38b8e6f0 编写于 作者: A anish kumar 提交者: Mark Brown

ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

refactor snd_soc_dapm_new_pcm to reduce the size of
this function to facilitate further refactoring.
Signed-off-by: Nanish kumar <yesanishhere@gmail.com>
Reviewed-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 e5af4f9f
......@@ -3821,19 +3821,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
devm_kasprintf(card->dev, GFP_KERNEL,
"Anonymous Configuration %d",
count);
if (!w_param_text[count]) {
ret = -ENOMEM;
goto outfree_link_name;
}
} else {
w_param_text[count] = devm_kmemdup(card->dev,
config->stream_name,
strlen(config->stream_name) + 1,
GFP_KERNEL);
if (!w_param_text[count]) {
ret = -ENOMEM;
goto outfree_link_name;
}
}
if (!w_param_text[count]) {
ret = -ENOMEM;
goto outfree_link_name;
}
config++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册